Permalink
Browse files

Avoid hard-coded value in test setup/teardown.

  • Loading branch information...
1 parent da19e0d commit d9be7ad7cf62d82128deb1e6738fab9b7b5d5653 @zuhao zuhao committed Jun 5, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 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

0 comments on commit d9be7ad

Please sign in to comment.