Failing feature step when have_selector uses block

Hi – I have a strange bug.
The following step will pass:

Then /^I should not see any options for the properties$/ do
response.should have_selector( “table thead” )
end

But this will fail:

Then /^I should not see any options for the properties$/ do
response.should have_selector( “table thead” ) do |thead|
thead.should_not contain( “Options” )
end
end

The strange thing is that it isn’t the inner specification that fails,
but
the outer one that is (or should be) identical to the first example
(which
is just a reduced version of the second to investigate what was
failing).
This is the second weird thing I have seen with nested blocks in
have_selector (the first was nested calls to have_selector only checking
immediate descendants of the block parameter). Is there something about
their use that I’m not understanding?
Cheers,
Doug.

On Wed, May 20, 2009 at 5:30 AM, doug livesey [email protected] wrote:

response.should have_selector( “table thead” ) do |thead|
their use that I’m not understanding?
Are you using selenium or just with webrat?

http://groups.google.com/group/webrat?hl=en
-~----------~----~----~----~------~----~------~–~—


Zach D.
http://www.continuousthinking.com (personal)
http://www.mutuallyhuman.com (hire me)
http://ideafoundry.info/behavior-driven-development (first rate BDD
training)
@zachdennis (twitter)