From 9b2fb895225ac97d510faa60a843ad4c911be9c3 Mon Sep 17 00:00:00 2001 From: Jonas Nicklas Date: Tue, 26 Feb 2013 08:30:55 +0100 Subject: [PATCH] Use have_content over should match --- lib/capybara/spec/session/visit_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/capybara/spec/session/visit_spec.rb b/lib/capybara/spec/session/visit_spec.rb index 6992d06f..34e0c980 100644 --- a/lib/capybara/spec/session/visit_spec.rb +++ b/lib/capybara/spec/session/visit_spec.rb @@ -72,18 +72,18 @@ Capybara::SpecHelper.spec '#visit' do it "should send a referer when following a link" do @session.visit '/referer_base' @session.find('//a[@href="/get_referer"]').click - @session.body.should match %r{http://.*/referer_base} + @session.should have_content %r{http://.*/referer_base} end it "should preserve the original referer URL when following a redirect" do @session.visit('/referer_base') @session.find('//a[@href="/redirect_to_get_referer"]').click - @session.body.should match %r{http://.*/referer_base} + @session.should have_content %r{http://.*/referer_base} end it "should send a referer when submitting a form" do @session.visit '/referer_base' @session.find('//input').click - @session.body.should match %r{http://.*/referer_base} + @session.should have_content %r{http://.*/referer_base} end end