kucaahbe/rspec-html-matchers

with_tag matches parent tag

Opened this issue · 1 comments

If I have this string:
"<span>asd</span>"

and this matcher:

expect("<span>asd</span>").to have_tag(:span) do
  with_tag(:span) do
    with_tag(:span)
  end
end

This test will pass, while it should actually fail.

I'm seeing this as well.