I want to check against all the matchng scopes, not just the first one
Reported by auvi | November 23rd, 2009 @ 07:59 PM
Hi,
It seems counter intuitive that inside within you can only match against the first scope. For example if I have multiple entries of div elements with the class "comment", I would like to match against all of the occurrences, not the first one.
This is a failing test: http://github.com/auvi/webrat/commit/58c327c545ecd29f4cd574b105c7c2...
it "should look at all the mathching scopes" do
with_html <<-HTML
<html>
<div class="comments">
<div class="comment">hello</div>
<div class="comment">world!</div>
</div>
</html>
HTML
within ".comment" do |scope|
scope.should contain('world!')
end
end
WDYT?
Auvi
No comments found
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
- Nobody is watching this ticket.