diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-03 04:58:03 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-03 04:58:03 +0000 |
commit | 82aef2ae509361c08498c1a4ca07bf03866b5ecb (patch) | |
tree | 54050b8217338df866539e40682b66f7ad2e2b52 /test/rexml/test_document.rb | |
parent | c420f8449ea45dd4c45db9dea601039c47f3ecf3 (diff) | |
download | ruby-82aef2ae509361c08498c1a4ca07bf03866b5ecb.tar.gz |
* test/rexml/test_document.rb: Fix tests that expect encoding name
isn't normalized.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/test_document.rb')
-rw-r--r-- | test/rexml/test_document.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb index b78b310f00..0e154db20f 100644 --- a/test/rexml/test_document.rb +++ b/test/rexml/test_document.rb @@ -167,13 +167,12 @@ EOX ie_hack = false encoding = "Windows-31J" - xml_declaration_encoding = "Shift_JIS" - @document.xml_decl.encoding = xml_declaration_encoding + @document.xml_decl.encoding = "Shift_JIS" japanese_text = "こんにちは" @document.root.text = japanese_text @document.write(output, indent, transitive, ie_hack, encoding) assert_equal(<<-EOX.encode(encoding), output) -<?xml version='1.0' encoding='#{xml_declaration_encoding}'?> +<?xml version='1.0' encoding='SHIFT_JIS'?> <message>#{japanese_text}</message> EOX end @@ -221,13 +220,12 @@ EOX def test_encoding output = "" encoding = "Windows-31J" - xml_declaration_encoding = "Shift_JIS" - @document.xml_decl.encoding = xml_declaration_encoding + @document.xml_decl.encoding = "Shift_JIS" japanese_text = "こんにちは" @document.root.text = japanese_text @document.write(:output => output, :encoding => encoding) assert_equal(<<-EOX.encode(encoding), output) -<?xml version='1.0' encoding='#{xml_declaration_encoding}'?> +<?xml version='1.0' encoding='SHIFT_JIS'?> <message>#{japanese_text}</message> EOX end |