stevemolitor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Aug-26 17:03 UTC
assert_select and xml:base
I trying to use assert_select to verify some xml content, where I specify an xml:base attribute: <group xml:base=''http://blah''/> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stevemolitor wrote:> <group xml:base=''http://blah''/> > > 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: http://www.oreillynet.com/onlamp/blog/2007/08/assert_hpricot_1.html -- Phlip http://www.oreilly.com/catalog/9780596510657/ "Test Driven Ajax (on Rails)" assert_xpath, assert_javascript, & assert_ajax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---