summaryrefslogtreecommitdiffstats
path: root/test/rss/rss-testcase.rb
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
commitfbd595124a791a2cd161a51d3e4d73aca90c850c (patch)
tree62f2f962baf6a263fb7b5295287a8cb6feff8927 /test/rss/rss-testcase.rb
parent006a79536c2198ea73d1f05bea9a29a64216709c (diff)
downloadruby-fbd595124a791a2cd161a51d3e4d73aca90c850c.tar.gz
ruby-fbd595124a791a2cd161a51d3e4d73aca90c850c.tar.xz
ruby-fbd595124a791a2cd161a51d3e4d73aca90c850c.zip
* lib/rss: supported Image module.
http://web.resource.org/rss/1.0/modules/image/ git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/rss-testcase.rb')
-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 27b4eba5d..f3a2760fd 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"