Use helper method here.
This commit is contained in:
parent
a0f95a887e
commit
e804104200
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user