[rspec-users] [webrat] failing feature step when have_selector uses block

Zach Dennis zach.dennis at gmail.com
Wed May 20 17:04:55 EDT 2009


On Wed, May 20, 2009 at 5:30 AM, doug livesey <biot023 at gmail.com> wrote:
> 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?

Are you using selenium or just with webrat?

> Cheers,
>    Doug.
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups
> "webrat" group.
> To post to this group, send email to webrat at googlegroups.com
> To unsubscribe from this group, send email to
> webrat+unsubscribe at googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/webrat?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>



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


More information about the rspec-users mailing list