kucaahbe / rspec-html-matchers

Old school have_tag, with_tag(and more) matchers for rspec 3 (Nokogiri powered)
http://rubygems.org/gems/rspec-html-matchers
MIT License
199 stars 90 forks source link

with_tag matches parent tag #65

Open vfonic opened 7 years ago

vfonic commented 7 years ago

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.

tammersaleh commented 5 years ago

I'm seeing this as well.