#314 new
auvi

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

New-ticket Create new ticket

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.

Shared Ticket Bins

People watching this ticket

Tags

Pages