summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-03 15:31:57 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-03 15:31:57 +0000
commitca1f8939daaf49f0ae4c6a0fc9a378bc095c99a7 (patch)
tree073e45fa7693059f72ec56d8109bab43d8cac0ee /test
parent1839bc333d514f567c66e715fd7999a157fde41d (diff)
* lib/rss: supported Image module.
http://web.resource.org/rss/1.0/modules/image/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rss/rss-testcase.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/rss/rss-testcase.rb b/test/rss/rss-testcase.rb
index 27b4eba..f3a2760 100644
--- a/test/rss/rss-testcase.rb
+++ b/test/rss/rss-testcase.rb
@@ -1,10 +1,11 @@
-# -*- tab-width: 2 -*- vim: ts=2
+require "erb"
require "test/unit"
require 'rss-assertions'
module RSS
class TestCase < Test::Unit::TestCase
+ include ERB::Util
include RSS
include Assertions
@@ -189,6 +190,17 @@ EOI
EOC
end
+ def make_element(elem_name, attrs, contents)
+ attrs_str = attrs.collect do |name, value|
+ "#{h name}='#{h value}'"
+ end.join(" ")
+ contents_str = contents.collect do |name, value|
+ "#{Element::INDENT}<#{h name}>#{h value}</#{h name}>"
+ end.join("\n")
+
+ "<#{h elem_name} #{attrs_str}>\n#{contents_str}\n</#{h elem_name}>"
+ end
+
private
def setup_dummy_channel(maker)
about = "http://hoge.com"