1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Avoid hard-coded value in test setup/teardown.

This commit is contained in:
Zuhao Wan 2014-06-05 22:39:03 +08:00
parent da19e0d132
commit d9be7ad7cf

View file

@ -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