diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-20 13:41:05 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-20 13:41:05 +0000 |
commit | bcb7d7434e804a118787bce1365c4bc28f6a1784 (patch) | |
tree | 121a82abc016badfeeb77a947e09cf84ef681067 /spec/controllers/admin_request_controller_spec.rb | |
parent | 8932a6d67c4386a378783b8a6a1ded4d93c41891 (diff) |
Clear routing filters while tests are running
This fixes a test failure that would show up when running this spec
in isolation -- but not necessarily when running all tests, depending
on the order they run in.
Diffstat (limited to 'spec/controllers/admin_request_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin_request_controller_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/admin_request_controller_spec.rb b/spec/controllers/admin_request_controller_spec.rb index 77f336eee..6d3c955bb 100644 --- a/spec/controllers/admin_request_controller_spec.rb +++ b/spec/controllers/admin_request_controller_spec.rb @@ -7,6 +7,11 @@ describe AdminRequestController, "when administering requests" do before(:each) do load_raw_emails_data(raw_emails) + @old_filters = ActionController::Routing::Routes.filters + ActionController::Routing::Routes.filters = RoutingFilter::Chain.new + end + after do + ActionController::Routing::Routes.filters = @old_filters end it "shows the index/list page" do @@ -49,6 +54,11 @@ describe AdminRequestController, "when administering the holding pen" do before(:each) do basic_auth_login @request load_raw_emails_data(raw_emails) + @old_filters = ActionController::Routing::Routes.filters + ActionController::Routing::Routes.filters = RoutingFilter::Chain.new + end + after do + ActionController::Routing::Routes.filters = @old_filters end it "shows a rejection reason for an incoming message from an invalid address" do |