aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorZuhao Wan <wanzuhao@gmail.com>2014-06-05 22:39:03 +0800
committerZuhao Wan <wanzuhao@gmail.com>2014-06-05 22:39:03 +0800
commitd9be7ad7cf62d82128deb1e6738fab9b7b5d5653 (patch)
treefcecd4d65f643b09a3740b9af088b2ce71269883 /actionpack
parentda19e0d13298bc31051e9c67b5eda206413ae0dc (diff)
downloadrails-d9be7ad7cf62d82128deb1e6738fab9b7b5d5653.tar.gz
rails-d9be7ad7cf62d82128deb1e6738fab9b7b5d5653.tar.bz2
rails-d9be7ad7cf62d82128deb1e6738fab9b7b5d5653.zip
Avoid hard-coded value in test setup/teardown.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/request_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index b48e8ab974..e4950a5d6b 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -805,6 +805,7 @@ class RequestFormat < BaseRequestTest
end
test "ignore_accept_header" do
+ old_ignore_accept_header = ActionDispatch::Request.ignore_accept_header
ActionDispatch::Request.ignore_accept_header = true
begin
@@ -834,7 +835,7 @@ class RequestFormat < BaseRequestTest
request.expects(:parameters).at_least_once.returns({:format => :json})
assert_equal [ Mime::JSON ], request.formats
ensure
- ActionDispatch::Request.ignore_accept_header = false
+ ActionDispatch::Request.ignore_accept_header = old_ignore_accept_header
end
end
end