aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock6
-rw-r--r--spec/views/public_body/show.rhtml_spec.rb4
3 files changed, 9 insertions, 2 deletions
diff --git a/Gemfile b/Gemfile
index eb330f813..b451cfffe 100644
--- a/Gemfile
+++ b/Gemfile
@@ -44,6 +44,7 @@ gem 'globalize3'
group :test do
gem 'fakeweb'
gem 'test-unit', '~> 1.2.3', :platforms => :ruby_19
+ gem 'webrat'
end
group :development do
diff --git a/Gemfile.lock b/Gemfile.lock
index 36623e018..b6fc69219 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -103,6 +103,7 @@ GEM
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
newrelic_rpm (3.5.3.25)
+ nokogiri (1.5.5)
paper_trail (2.6.4)
activerecord (~> 3.0)
railties (~> 3.0)
@@ -190,6 +191,10 @@ GEM
polyglot (>= 0.3.1)
tzinfo (0.3.35)
vpim (0.695)
+ webrat (0.7.3)
+ nokogiri (>= 1.2.0)
+ rack (>= 1.0)
+ rack-test (>= 0.5.3)
will_paginate (2.3.16)
xapian-full-alaveteli (1.2.9.5)
xml-simple (1.1.2)
@@ -234,6 +239,7 @@ DEPENDENCIES
test-unit (~> 1.2.3)
tmail
vpim
+ webrat
will_paginate (~> 2.3.11)
xapian-full-alaveteli (~> 1.2.9.5)
xml-simple
diff --git a/spec/views/public_body/show.rhtml_spec.rb b/spec/views/public_body/show.rhtml_spec.rb
index 5e30001af..b599cebd6 100644
--- a/spec/views/public_body/show.rhtml_spec.rb
+++ b/spec/views/public_body/show.rhtml_spec.rb
@@ -43,7 +43,7 @@ describe "public_body/show" do
it "should show the body's name" do
render
- response.should have_tag("h1", "Test Quango")
+ response.should have_selector('h1', :content => "Test Quango")
end
it "should tell total number of requests" do
@@ -54,7 +54,7 @@ describe "public_body/show" do
it "should cope with no results" do
@pb.stub!(:info_requests).and_return([])
render
- response.should have_tag("p", /Nobody has made any Freedom of Information requests/m)
+ response.should have_selector('p', :content => "Nobody has made any Freedom of Information requests")
end
it "should cope with Xapian being down" do