summaryrefslogtreecommitdiff
path: root/test/rss
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-30 12:10:56 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-30 12:10:56 +0000
commit994f066f76857a781f8819b8da2c2aeceedbf87b (patch)
treed89e9bcf6ac8d558367f888919de0c4894224063 /test/rss
parent767fe5170d97461be5c79936b467dee3d4eb7179 (diff)
* lib/rexml/encoding.rb: use Ruby native encoding mechnism. [ruby-dev:42464]
* lib/rexml/encodings/: remove. * lib/rexml/document.rb, lib/rexml/formatters/default.rb, lib/rexml/output.rb, lib/rexml/parseexception.rb, lib/rexml/parsers/baseparser.rb, lib/rexml/source.rb, lib/rexml/xmldecl.rb: use Ruby's native Encoding object. * test/rexml/, test/rss/: follow the above encoding chagnes. * NEWS: add REXML's incompatible change about encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss')
-rw-r--r--test/rss/test_1.0.rb5
-rw-r--r--test/rss/test_2.0.rb5
-rw-r--r--test/rss/test_atom.rb10
3 files changed, 8 insertions, 12 deletions
diff --git a/test/rss/test_1.0.rb b/test/rss/test_1.0.rb
index 52ad24c..4b496ad 100644
--- a/test/rss/test_1.0.rb
+++ b/test/rss/test_1.0.rb
@@ -24,9 +24,8 @@ module RSS
xmldecl = doc.xml_decl
- %w(version encoding).each do |x|
- assert_equal(instance_eval(x), xmldecl.__send__(x))
- end
+ assert_equal(version, xmldecl.version)
+ assert_equal(encoding, xmldecl.encoding.to_s)
assert_equal(standalone, !xmldecl.standalone.nil?)
assert_equal(@rdf_uri, doc.root.namespace)
diff --git a/test/rss/test_2.0.rb b/test/rss/test_2.0.rb
index 884afcc..ed83ca6 100644
--- a/test/rss/test_2.0.rb
+++ b/test/rss/test_2.0.rb
@@ -21,9 +21,8 @@ module RSS
xmldecl = doc.xml_decl
- %w(version encoding).each do |x|
- assert_equal(instance_eval(x), xmldecl.__send__(x))
- end
+ assert_equal(version, xmldecl.version)
+ assert_equal(encoding, xmldecl.encoding.to_s)
assert_equal(standalone, !xmldecl.standalone.nil?)
assert_equal("", doc.root.namespace)
diff --git a/test/rss/test_atom.rb b/test/rss/test_atom.rb
index 71e0f44..80da69b 100644
--- a/test/rss/test_atom.rb
+++ b/test/rss/test_atom.rb
@@ -69,9 +69,8 @@ module RSS
doc = REXML::Document.new(feed.to_s)
xmldecl = doc.xml_decl
- %w(version encoding).each do |x|
- assert_equal(instance_eval(x), xmldecl.__send__(x))
- end
+ assert_equal(version, xmldecl.version)
+ assert_equal(encoding, xmldecl.encoding.to_s)
assert_equal(standalone, !xmldecl.standalone.nil?)
assert_equal(@uri, doc.root.namespace)
@@ -96,9 +95,8 @@ module RSS
doc = REXML::Document.new(entry.to_s)
xmldecl = doc.xml_decl
- %w(version encoding).each do |x|
- assert_equal(instance_eval(x), xmldecl.__send__(x))
- end
+ assert_equal(version, xmldecl.version)
+ assert_equal(encoding, xmldecl.encoding.to_s)
assert_equal(standalone, !xmldecl.standalone.nil?)
assert_equal(@uri, doc.root.namespace)