summaryrefslogtreecommitdiff
path: root/test/rss/test_image.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-17 10:13:25 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-17 10:13:25 +0000
commit966a25465aab5c2972e6c453f631a15fc2223256 (patch)
tree847090e856c9901ab2cc19251c179b9b0985e65b /test/rss/test_image.rb
parent53cbab048452742b537ac8bccf494630d1c184c8 (diff)
* lib/rss, test/rss:
- supported Atom. - bumped version 0.1.6 to 0.1.7. * sample/rss/convert.rb: added new sample. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_image.rb')
-rw-r--r--test/rss/test_image.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/rss/test_image.rb b/test/rss/test_image.rb
index 0fb9fce..8bb7323 100644
--- a/test/rss/test_image.rb
+++ b/test/rss/test_image.rb
@@ -52,11 +52,11 @@ module RSS
items << make_item(image_item)
end
- ns = {
+ @ns = {
@prefix => @uri,
DC_PREFIX => DC_URI,
}
- @rss_source = make_RDF(<<-EOR, ns)
+ @rss_source = make_RDF(<<-EOR, @ns)
#{make_channel(@channel_nodes)}
#{make_image}
#{items}
@@ -70,13 +70,23 @@ EOR
assert_nothing_raised do
Parser.parse(@rss_source)
end
-
+
assert_too_much_tag("favicon", "channel") do
- Parser.parse(make_RDF(<<-EOR, {@prefix => @uri}))
+ Parser.parse(make_RDF(<<-EOR, @ns))
#{make_channel(@channel_nodes * 2)}
#{make_item}
EOR
end
+
+ attrs = {"rdf:about" => "http://www.example.org/item.png"}
+ contents = [["#{@prefix}:width", "80"]] * 5
+ image_item = make_element("#{@prefix}:item", attrs, contents)
+ assert_too_much_tag("width", "item") do
+ Parser.parse(make_RDF(<<-EOR, @ns))
+#{make_channel}
+#{make_item(image_item)}
+EOR
+ end
end
def test_favicon_accessor