You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the title is too hard to understand, please take a look at this example.
expect('<div><p>test</p></div><div><h2>test2</h2></div>').to have_tag('div') do
with_tag 'p'
with_tag 'h2'
end
The string consists of 2 divs, where one has a p tag and the other one has a h2 tag.
Intuitively, I would expect the expectation to fail because the string does not have a div tag with tags p and h2.
However, it does not fail.
It would be great if there was an option to require all nested matchers to be true for a single element of the outer scope instead of being true for any element of the outer scope.
I might try to implement it myself and create a pull request.
The text was updated successfully, but these errors were encountered:
If the title is too hard to understand, please take a look at this example.
The string consists of 2
div
s, where one has ap
tag and the other one has ah2
tag.Intuitively, I would expect the expectation to fail because the string does not have a
div
tag with tagsp
andh2
.However, it does not fail.
It would be great if there was an option to require all nested matchers to be true for a single element of the outer scope instead of being true for any element of the outer scope.
I might try to implement it myself and create a pull request.
The text was updated successfully, but these errors were encountered: