summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 01:04:31 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 01:04:31 +0000
commit463c6a218fed7248531a002806e9b07be7f5a6ea (patch)
tree69741dee756af0a86c03e3bae8d2574a839fc426 /test
parent448dce34a627cf46d844c2e7c628a7af8174fcb4 (diff)
* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/rss.rb: added backward compatibility codes. * lib/rss/parser.rb: ditto. * test/rss/test_parser.rb: ditto. * test/rss/test_2.0.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rss/test_2.0.rb8
-rw-r--r--test/rss/test_parser.rb12
2 files changed, 15 insertions, 5 deletions
diff --git a/test/rss/test_2.0.rb b/test/rss/test_2.0.rb
index 5e2e6bd..2027e53 100644
--- a/test/rss/test_2.0.rb
+++ b/test/rss/test_2.0.rb
@@ -145,7 +145,7 @@ module RSS
actual = {}
cloud_elem.attributes.each do |name, value|
value = value.to_i if name == "port"
- actual[name.to_sym] = value
+ actual[name.intern] = value
end
assert_equal(cloud_params, actual)
end
@@ -313,7 +313,7 @@ module RSS
actual = {}
enclosure_elem.attributes.each do |name, value|
value = value.to_i if name == "length"
- actual[name.to_sym] = value
+ actual[name.intern] = value
end
assert_equal(enclosure_params, actual)
end
@@ -348,7 +348,7 @@ module RSS
actual[:content] = guid_elem.text if guid_elem.text
guid_elem.attributes.each do |name, value|
value = value == "true" if name == "isPermaLink"
- actual[name.to_sym] = value
+ actual[name.intern] = value
end
assert_equal(guid_params, actual)
end
@@ -369,7 +369,7 @@ module RSS
actual = {}
actual[:content] = source_elem.text
source_elem.attributes.each do |name, value|
- actual[name.to_sym] = value
+ actual[name.intern] = value
end
assert_equal(source_params, actual)
end
diff --git a/test/rss/test_parser.rb b/test/rss/test_parser.rb
index d6de069..f410b1b 100644
--- a/test/rss/test_parser.rb
+++ b/test/rss/test_parser.rb
@@ -1,4 +1,14 @@
-require "fileutils"
+begin
+ require "fileutils"
+rescue LoadError
+ module FileUtils
+ module_function
+ def rm_f(target)
+ File.unlink(target)
+ rescue Errno::ENOENT
+ end
+ end
+end
require "rss-testcase"