aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2017-07-13 01:34:57 +0900
committeryui-knk <spiketeika@gmail.com>2017-07-13 01:39:04 +0900
commit752e8172b6e2558cf6211734a735c9631f5832bb (patch)
treeafd50e3aea0815cfb4909fb2cd777c3d9e5a6fcb /actionpack
parent58f10a31b37e9bb6e975a71aa63744f318ee043d (diff)
downloadrails-752e8172b6e2558cf6211734a735c9631f5832bb.tar.gz
rails-752e8172b6e2558cf6211734a735c9631f5832bb.tar.bz2
rails-752e8172b6e2558cf6211734a735c9631f5832bb.zip
Remove needless restoring of `default_charset`
`default_charset` is not changed in this test case, so we do not need to backup an original value and restore it.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/response_test.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index 7433c5ce0c..5975766cf2 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -294,13 +294,8 @@ class ResponseTest < ActiveSupport::TestCase
end
test "read content type with default charset utf-8" do
- original = ActionDispatch::Response.default_charset
- begin
- resp = ActionDispatch::Response.new(200, "Content-Type" => "text/xml")
- assert_equal("utf-8", resp.charset)
- ensure
- ActionDispatch::Response.default_charset = original
- end
+ resp = ActionDispatch::Response.new(200, "Content-Type" => "text/xml")
+ assert_equal("utf-8", resp.charset)
end
test "read content type with charset utf-16" do