From 752e8172b6e2558cf6211734a735c9631f5832bb Mon Sep 17 00:00:00 2001 From: yui-knk Date: Thu, 13 Jul 2017 01:34:57 +0900 Subject: 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. --- actionpack/test/dispatch/response_test.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'actionpack') 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 -- cgit v1.2.3