Skip to content
This repository
Browse code

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

…ting.
  • Loading branch information...
commit 923ba31657252b49d8c9e9433974afd2719eb43e 1 parent 5790269
Emilio Tagua authored September 28, 2010 carlosantoniodasilva committed March 27, 2012

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  actionpack/test/template/template_test.rb
5  actionpack/test/template/template_test.rb
@@ -123,10 +123,11 @@ def test_error_when_template_isnt_valid_utf8
123 123
     end
124 124
 
125 125
     def with_external_encoding(encoding)
126  
-      old, Encoding.default_external = Encoding.default_external, encoding
  126
+      old = Encoding.default_external
  127
+      silence_warnings { Encoding.default_external = encoding }
127 128
       yield
128 129
     ensure
129  
-      Encoding.default_external = old
  130
+      silence_warnings { Encoding.default_external = old }
130 131
     end
131 132
 
132 133
     def test_render_inline_safebuffer_should_not_raise_error

0 notes on commit 923ba31

Please sign in to comment.
Something went wrong with that request. Please try again.