diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-06-05 16:54:47 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-06-05 16:54:47 +0200 |
commit | 1b0c2146782bd45999e30549fd1d1d1e7cef8266 (patch) | |
tree | fcecd4d65f643b09a3740b9af088b2ce71269883 /actionpack | |
parent | da19e0d13298bc31051e9c67b5eda206413ae0dc (diff) | |
parent | d9be7ad7cf62d82128deb1e6738fab9b7b5d5653 (diff) | |
download | rails-1b0c2146782bd45999e30549fd1d1d1e7cef8266.tar.gz rails-1b0c2146782bd45999e30549fd1d1d1e7cef8266.tar.bz2 rails-1b0c2146782bd45999e30549fd1d1d1e7cef8266.zip |
Merge pull request #15531 from zuhao/refactor_actionpack_request_test
Avoid hard-coded value in test setup/teardown.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index b48e8ab974..e4950a5d6b 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/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 |