diff options
author | Henare Degan <henare.degan@gmail.com> | 2012-12-11 16:32:36 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2012-12-11 16:32:36 +1100 |
commit | 7bc26134d591655ffe01cc79a21b88451d3ca71e (patch) | |
tree | c1729ce670760a5b3dc4b32e554341b2ed51aff7 | |
parent | c5e0f72faf6b2a31fea5e1319f77523947e2ea95 (diff) |
Upgrade remaining matchers
-rw-r--r-- | spec/views/public_body/show.rhtml_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/views/public_body/show.rhtml_spec.rb b/spec/views/public_body/show.rhtml_spec.rb index b599cebd6..a6cac33fa 100644 --- a/spec/views/public_body/show.rhtml_spec.rb +++ b/spec/views/public_body/show.rhtml_spec.rb @@ -58,9 +58,9 @@ describe "public_body/show" do end it "should cope with Xapian being down" do - assigns[:xapian_requests] = nil + assign(:xapian_requests, nil) render - response.should have_tag("p", /The search index is currently offline/m) + response.should match "The search index is currently offline" end it "should link to Charity Commission site if we have numbers to do so" do @@ -68,11 +68,11 @@ describe "public_body/show" do @pb.stub!(:get_tag_values).and_return(['98765', '12345']) render - response.should have_tag("div#header_right") do - with_tag("a[href*=?]", /charity-commission.gov.uk.*RegisteredCharityNumber=98765$/) + response.should have_selector("div#header_right") do + have_selector "a", :href => /charity-commission.gov.uk.*RegisteredCharityNumber=98765$/ end - response.should have_tag("div#header_right") do - with_tag("a[href*=?]", /charity-commission.gov.uk.*RegisteredCharityNumber=12345$/) + response.should have_selector("div#header_right") do + have_selector "a", :href => /www.charity-commission.gov.uk.*RegisteredCharityNumber=12345$/ end end @@ -81,16 +81,16 @@ describe "public_body/show" do @pb.stub!(:get_tag_values).and_return(['SC1234']) render - response.should have_tag("div#header_right") do - with_tag("a[href*=?]", /www.oscr.org.uk.*id=SC1234$/) + response.should have_selector("div#header_right") do + have_selector "a", :href => /www.oscr.org.uk.*id=SC1234$/ end end it "should not link to Charity Commission site if we don't have number" do render - response.should have_tag("div#header_right") do - without_tag("a[href*=?]", /charity-commission.gov.uk/) + response.should have_selector("div#header_right") do + have_selector "a", :href => /charity-commission.gov.uk/ end end |