Permalink
Browse files

Use helper method here.

  • Loading branch information...
1 parent a0f95a8 commit e8041042006eb7cb3253f1bdb38d6e2fe9a785d7 @miloops miloops committed Sep 28, 2010
Showing with 5 additions and 6 deletions.
  1. +5 −6 actionpack/test/template/template_test.rb
@@ -83,12 +83,11 @@ def test_no_magic_comment_word_with_utf_8
# 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

0 comments on commit e804104

Please sign in to comment.