From 966a25465aab5c2972e6c453f631a15fc2223256 Mon Sep 17 00:00:00 2001 From: kou Date: Sat, 17 Mar 2007 10:13:25 +0000 Subject: * 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 --- test/rss/test_image.rb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'test/rss/test_image.rb') diff --git a/test/rss/test_image.rb b/test/rss/test_image.rb index 0fb9fce276..8bb7323206 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,11 +70,21 @@ 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 -- cgit v1.2.3