diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-29 09:38:25 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-29 09:44:33 +0100 |
commit | af8291396f77f72babf79ba32a0118128b4ce240 (patch) | |
tree | 134889034e61f7cbedc01af8928ebb55d4a50fad | |
parent | 33bd0e919528e1d7eda4be4200db91b042984c97 (diff) |
work around TestRequest bug to get tests to pass
-rw-r--r-- | spec/views/request/list.rhtml_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/views/request/list.rhtml_spec.rb b/spec/views/request/list.rhtml_spec.rb index 578bd5cc8..60a28eec5 100644 --- a/spec/views/request/list.rhtml_spec.rb +++ b/spec/views/request/list.rhtml_spec.rb @@ -5,7 +5,8 @@ describe "when listing recent requests" do before do assigns[:page] = 1 assigns[:per_page] = 10 - + # work round a bug in ActionController::TestRequest; allows request.query_string to work in the template + request.env["REQUEST_URI"] = "" # we're not testing the interlock plugin's cache template.stub!(:view_cache).and_yield end @@ -32,9 +33,7 @@ describe "when listing recent requests" do it "should be successful" do assigns[:list_results] = [ make_mock_event, make_mock_event ] assigns[:matches_estimated] = 2 - render "request/list" - response.should have_tag("div.request_listing") response.should_not have_tag("p", /No requests of this sort yet/m) end @@ -42,7 +41,6 @@ describe "when listing recent requests" do it "should cope with no results" do assigns[:list_results] = [ ] assigns[:matches_estimated] = 0 - render "request/list" response.should have_tag("p", /No requests of this sort yet/m) response.should_not have_tag("div.request_listing") |