Skip to content
Browse files

Merge pull request #15531 from zuhao/refactor_actionpack_request_test

Avoid hard-coded value in test setup/teardown.
  • Loading branch information...
2 parents da19e0d + d9be7ad commit 1b0c2146782bd45999e30549fd1d1d1e7cef8266 @senny senny committed Jun 5, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/test/dispatch/request_test.rb
View
3 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 1b0c214

Please sign in to comment.
Something went wrong with that request. Please try again.