
Nesting should and should_not and have_xpath
Reported by Rob Holland | March 2nd, 2009 @ 08:25 AM
The following spec fails when added to have_selector_spec.rb.
it "should support mixing positive and negative assertions" do
@body.should have_selector("ul") do |n|
n.should_not have_selector("li", :content => "Third")
end
end
Guessing the issue is with HaveXpath.matches?
I'm afraid I wasn't able to grasp how the code there works.
Comments and changes to this ticket
-
Jason Garber April 15th, 2009 @ 03:27 PM
I just ran into the same bug and found this ticket. Luismi's patch worked for me. Hope it gets applied soon!
-
gaffo May 7th, 2009 @ 06:54 PM
- Tag changed from bug, have_selector, have_xpath, patch, spec to bug, have_selector, have_xpath, patch, spec, verify
- State changed from new to awaiting-merge
Need to verify patch but it looks good as it's just a test addition and a fix.
-
Bryan Helmkamp April 23rd, 2010 @ 12:19 PM
- State changed from awaiting-merge to resolved
(from [43b19eeafa44311b01d4755c43a74972dea07302]) Fix have_xpath not matching negative expectation in the block.
[#182 state:resolved] http://github.com/brynary/webrat/commit/43b19eeafa44311b01d4755c43a...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.
People watching this ticket
Referenced by
-
182 Nesting should and should_not and have_xpath [#182 state:resolved] http://github.com/brynary/webrat/c...