diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:16:26 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:16:26 -0300 |
commit | e8041042006eb7cb3253f1bdb38d6e2fe9a785d7 (patch) | |
tree | 31bf7fd52230e980be33c65196cd5cd374e9e2aa /actionpack/test | |
parent | a0f95a887eaca32dd9d65a719c967865c7d4d664 (diff) | |
download | rails-e8041042006eb7cb3253f1bdb38d6e2fe9a785d7.tar.gz rails-e8041042006eb7cb3253f1bdb38d6e2fe9a785d7.tar.bz2 rails-e8041042006eb7cb3253f1bdb38d6e2fe9a785d7.zip |
Use helper method here.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/template_test.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb index 36fc9ccf91..c7c33af670 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -83,12 +83,11 @@ class TestERBTemplate < ActiveSupport::TestCase # is set to something other than UTF-8, we don't # get any errors and get back a UTF-8 String. def test_default_external_works - Encoding.default_external = "ISO-8859-1" - @template = new_template("hello \xFCmlat") - assert_equal Encoding::UTF_8, render.encoding - assert_equal "hello \u{fc}mlat", render - ensure - Encoding.default_external = "UTF-8" + with_external_encoding "ISO-8859-1" do + @template = new_template("hello \xFCmlat") + assert_equal Encoding::UTF_8, render.encoding + assert_equal "hello \u{fc}mlat", render + end end def test_encoding_can_be_specified_with_magic_comment |