On Tue, Jun 23, 2009 at 5:00 PM, mBread <[email protected]> wrote:

> I am wanting to specify "Then I should not see a "New item" link" in a
> cucumber scenario. Is it possible to use Webrat::Locators.find_link (as used
> in click_link) in a cucumber step definition? Or is there some reason why I
> shouldn't assert the absence of a link? I could just use
>
> response.should_not contain(text)
>
> but I want to make sure it's a link that it's looking for, as the text may
> happen to appear elsewhere in the middle of a sentance.
>
> Thanks
>
How about:
response.should_not have_selector("a", :content => 'New item')

Note this is gmail code and untested :)

Ben
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to