#157 ✓resolved
Peter Jaros

Matchers don't pick up do/end blocks

Reported by Peter Jaros | February 8th, 2009 @ 07:10 PM | in 0.4.2

Because of the way do/end blocks bind, when you say

body.should have_selector("div#profile) do |profile|
  profile.should have_selector("div.name")
end

the block is passed to #should, not have_selector. The block never runs and is silently ignored. However, the block is passed to the matcher's #matches? method, which is how RSpec's #has_tag gets it.

Fixed as http://github.com/Peeja/webrat/c...>

Comments and changes to this ticket

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.

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

Referenced by

Pages