Permalink
Browse files

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

…ting.
  • Loading branch information...
1 parent 5790269 commit 923ba31657252b49d8c9e9433974afd2719eb43e @miloops miloops committed with carlosantoniodasilva Sep 28, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 actionpack/test/template/template_test.rb
@@ -123,10 +123,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
def test_render_inline_safebuffer_should_not_raise_error

0 comments on commit 923ba31

Please sign in to comment.