Permalink
Browse files

Silence warnings here, only setting Encoding.default_external for tes…

…ting.
  • Loading branch information...
miloops committed Sep 28, 2010
1 parent d1e976d commit a0f95a887eaca32dd9d65a719c967865c7d4d664
Showing with 3 additions and 2 deletions.
  1. +3 −2 actionpack/test/template/template_test.rb
@@ -124,10 +124,11 @@ def test_error_when_template_isnt_valid_utf8
end
def with_external_encoding(encoding)
- old, Encoding.default_external = Encoding.default_external, encoding
+ old = Encoding.default_external
+ silence_warnings { Encoding.default_external = encoding }
yield
ensure
- Encoding.default_external = old
+ silence_warnings { Encoding.default_external = old }
end
end
end

0 comments on commit a0f95a8

Please sign in to comment.