
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
-
Bryan Helmkamp February 8th, 2009 @ 11:24 PM
- Milestone set to 0.4.2
- Assigned user set to Bryan Helmkamp
- State changed from new to awaiting-merge
-
Bryan Helmkamp February 9th, 2009 @ 12:31 AM
- State changed from awaiting-merge to resolved
(from [24eab77ecda60c80743b04321d7c520895c1862c]) Accept do/end blocks in matchers. [#157 state:resolved] http://github.com/brynary/webrat...
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
-
157 Matchers don't pick up do/end blocks (from [24eab77ecda60c80743b04321d7c520895c1862c]) Accept ...