From 4ef7ec62cab725ad1dea2be9a26ca0f9fd195729 Mon Sep 17 00:00:00 2001 From: kou Date: Wed, 23 Nov 2005 09:24:17 +0000 Subject: * lib/rss/maker/taxonomy.rb: implemented taxonomy module for RSS Maker. * lib/rss/taxonomy.rb: supported RSS Maker. * lib/rss/maker.rb: added taxonomy module support. * lib/rss/rss.rb: adjusted to other element API. * lib/rss/1.0.rb: adjusted to other element API but backward compatibility is reserved. * lib/rss/0.9.rb: ditto. * test/rss/test_maker_taxo.rb: added test case for taxonomy module for RSS Maker. * test/rss/test_setup_maker_1.0.rb: added tests for taxo:topic. * test/rss/test_setup_maker_1.0.rb: added backward compatibility test. * test/rss/test_setup_maker_0.9.rb: ditto. * test/rss/test_setup_maker_2.0.rb: ditto. * test/rss/rss-testcase.rb: added convenience method for setting up taxo:topic. * test/rss/rss-assertions.rb: added assertion for taxo:topic. * sample/rss/blend.rb: followed new API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rss/rss-assertions.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test/rss/rss-assertions.rb') diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb index f5e8c5ccaa..d8e597cd5a 100644 --- a/test/rss/rss-assertions.rb +++ b/test/rss/rss-assertions.rb @@ -435,6 +435,25 @@ module RSS end end + def assert_taxo_topic(topics, target) + _wrap_assertion do + topics.each_with_index do |topic, i| + taxo_topic = target.taxo_topics[i] + topic.each do |name, value| + case name + when :link + assert_equal(value, taxo_topic.about) + assert_equal(value, taxo_topic.taxo_link) + when :topics + assert_equal(value, taxo_topic.taxo_topics.resources) + else + assert_equal(value, taxo_topic.__send__("dc_#{name}")) + end + end + end + end + end + def assert_attributes(attrs, names, target) _wrap_assertion do -- cgit v1.2.3