diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:11:57 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:11:57 -0300 |
commit | a0f95a887eaca32dd9d65a719c967865c7d4d664 (patch) | |
tree | c6841a32f5d394b46ab9f61292e861dd94f7fe6c /actionpack | |
parent | d1e976da7f8981c5cdbf8ee6520281fa78863f2f (diff) | |
download | rails-a0f95a887eaca32dd9d65a719c967865c7d4d664.tar.gz rails-a0f95a887eaca32dd9d65a719c967865c7d4d664.tar.bz2 rails-a0f95a887eaca32dd9d65a719c967865c7d4d664.zip |
Silence warnings here, only setting Encoding.default_external for testing.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/template/template_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb index d2c740a39e..36fc9ccf91 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -124,10 +124,11 @@ class TestERBTemplate < ActiveSupport::TestCase 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 |