[rspec-users] [RSpec] matcher for href

James Byrne lists at ruby-forum.com
Mon Jan 19 14:46:12 EST 2009


James Byrne wrote:
> Of the several ways available to test for this, what would be the
> preferred way to see if the following is present in an html document
> WITHOUT actually following the link?

Apparently this is the correct form:

   response.body.should have_tag("a[href=/users/new]")

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list