Assert_select and xml:base

I trying to use assert_select to verify some xml content, where I
specify an xml:base attribute:

However I get an ‘invalid selector’ error when doing this

assert_select "group[xml:base=‘http://blah/’]

I’ve tried variations like putting a blackslash in front of the colon,
quoting xml:base etc., all to no avail. Anyone know how to do this?

Thanks!

Steve

stevemolitor wrote:

However I get an ‘invalid selector’ error when doing this

assert_select "group[xml:base=‘http://blah/’]

I’ve tried variations like putting a blackslash in front of the colon,
quoting xml:base etc., all to no avail. Anyone know how to do this?

Try assert_xpath:

http://assertxpath.rubyforge.org/classes/AssertXPath.html#assert_xpath

I just recently tried it, with the REXML backend, on a fb:else tag,
and it
worked. I didn’t put a colon in the predicate, though!

I don’t know if assert_hpricot will work, from the same library, but
REXML
is tricky, so read this to learn the issue:


Phlip
http://www.oreilly.com/catalog/9780596510657/
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs