Root element is not matched
khustochka opened this issue · 2 comments
khustochka commented
def test_root_element
render_xml <<-EOF
<rss version="2.0">
<channel>
<item>
<description>
<![CDATA[
<p>Test 1</p>
]]>
</description>
</item>
<item>
<description>
<![CDATA[
<p>Test 2</p>
]]>
</description>
</item>
</channel>
</rss>
EOF
assert_select "rss"
endThis test fails with
Expected at least 1 element matching "rss", found 0..
Expected 0 to be >= 1.
If you check any other element, e.g. assert_select "channel" - it is OK.
kaspth commented
Again. Thanks for reporting this. I've added a failing test in #12.
Surprisingly this only happens when checking against xml.
kaspth commented
This should be fixed now. We're aren't making a new release just yet, so you'll have to add gem 'rails-dom-testing', github: 'rails/rails-dom-testing' in your Gemfile for now.
Thanks again.