diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:26:41 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:26:41 +0000 |
| commit | 45fcdf0e5e5b07bb8cd3b2ea6db03e20403395ce (patch) | |
| tree | 88c0ae0648d8f16759a9bb51d2ef1ae900c083ca /test/rss/rss-testcase.rb | |
| parent | 6e3ea97cbca7fa3eed47d74cf03353b2213902fd (diff) | |
| download | ruby-45fcdf0e5e5b07bb8cd3b2ea6db03e20403395ce.tar.gz ruby-45fcdf0e5e5b07bb8cd3b2ea6db03e20403395ce.tar.xz ruby-45fcdf0e5e5b07bb8cd3b2ea6db03e20403395ce.zip | |
* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/rss-testcase.rb')
| -rw-r--r-- | test/rss/rss-testcase.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rss/rss-testcase.rb b/test/rss/rss-testcase.rb index f3a2760fd..0612abccc 100644 --- a/test/rss/rss-testcase.rb +++ b/test/rss/rss-testcase.rb @@ -248,5 +248,24 @@ EOC item.link = link end + def setup_taxo_topic(target, topics) + topics.each do |topic| + taxo_topic = target.taxo_topics.new_taxo_topic + topic.each do |name, value| + case name + when :link + taxo_topic.taxo_link = value + when :topics + value.each do |t| + taxo_topic.taxo_topics << t + end + else + dc_elems = taxo_topic.__send__("dc_#{name}s") + dc_elem = dc_elems.__send__("new_#{name}") + dc_elem.value = value + end + end + end + end end end |
