Yehuda Katz wrote:
Any ideas?
Use assert_select to select the node around the target node you need. Then do this:
assert_select 'some node' do |node| assert_xml node.to_s assert_xpath 'match_me[ . = "contents" ]' end
Problem: XPath can't do RegExps (last time I checked). But it can do any other kind of query you can think of, competitive with query systems like SQL SELECT.
The assert_xpath support code is below my sig.