Skip to content

Commit

Permalink
Merge pull request #15531 from zuhao/refactor_actionpack_request_test
Browse files Browse the repository at this point in the history
Avoid hard-coded value in test setup/teardown.
  • Loading branch information
senny committed Jun 5, 2014
2 parents da19e0d + d9be7ad commit 1b0c214
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 1b0c214

Please sign in to comment.