Skip to content

Commit

Permalink
Avoid hard-coded value in test setup/teardown.
Browse files Browse the repository at this point in the history
  • Loading branch information
zuhao committed Jun 5, 2014
1 parent da19e0d commit d9be7ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion actionpack/test/dispatch/request_test.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d9be7ad

Please sign in to comment.