aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/static_test.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb
index f153030675..93e5c85a97 100644
--- a/actionpack/test/dispatch/static_test.rb
+++ b/actionpack/test/dispatch/static_test.rb
@@ -3,13 +3,17 @@ require 'zlib'
module StaticTests
def setup
- @default_internal_encoding = Encoding.default_internal
- @default_external_encoding = Encoding.default_external
+ silence_warnings do
+ @default_internal_encoding = Encoding.default_internal
+ @default_external_encoding = Encoding.default_external
+ end
end
def teardown
- Encoding.default_internal = @default_internal_encoding
- Encoding.default_external = @default_external_encoding
+ silence_warnings do
+ Encoding.default_internal = @default_internal_encoding
+ Encoding.default_external = @default_external_encoding
+ end
end
def test_serves_dynamic_content
@@ -25,8 +29,10 @@ module StaticTests
end
def test_handles_urls_with_ascii_8bit_on_win_31j
- Encoding.default_internal = "Windows-31J"
- Encoding.default_external = "Windows-31J"
+ silence_warnings do
+ Encoding.default_internal = "Windows-31J"
+ Encoding.default_external = "Windows-31J"
+ end
assert_equal "Hello, World!", get("/doorkeeper%E3E4".force_encoding('ASCII-8BIT')).body
end