diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-17 09:01:22 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-17 09:01:22 +0000 |
commit | 02c5d7e79a79b6fc09c31c90931c599b817eadba (patch) | |
tree | 5623af540ba5ec4725bc9abb0d7427d2223a4b32 /test | |
parent | fb1d1a917d25a1e79282f269e6f70fdbe3ac76ac (diff) |
* lib/rss/1.0.rb: added convenience method 'resources'.
* lib/rss/taxonomy.rb: ditto.
* test/rss/rss-assertions.rb: added test for 'resources'.
* test/rss/test_taxonomy.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/rss/rss-assertions.rb | 1 | ||||
-rw-r--r-- | test/rss/test_taxonomy.rb | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb index 2636062519..f5e8c5ccaa 100644 --- a/test/rss/rss-assertions.rb +++ b/test/rss/rss-assertions.rb @@ -193,6 +193,7 @@ module RSS def assert_channel10_items(attrs, items) _wrap_assertion do + assert_equal(items.resources, items.Seq.lis.collect {|x| x.resource}) items.Seq.lis.each_with_index do |li, i| assert_attributes(attrs[i], %w(resource), li) end diff --git a/test/rss/test_taxonomy.rb b/test/rss/test_taxonomy.rb index 0ece7b340e..fda4c9407b 100644 --- a/test/rss/test_taxonomy.rb +++ b/test/rss/test_taxonomy.rb @@ -117,6 +117,7 @@ EOR topics = @rss.channel.taxo_topics assert_equal(@topics_lis.sort, topics.Bag.lis.collect {|li| li.resource}.sort) + assert_equal(@topics_lis.sort, topics.resources.sort) assert_equal(@rss.taxo_topics.first, @rss.taxo_topic) @@ -128,8 +129,7 @@ EOR assert_equal(value, topic.about) assert_equal(value, topic.taxo_link) when :topics - assert_equal(value.sort, - topic.taxo_topics.Bag.lis.collect {|li| li.resource}.sort) + assert_equal(value.sort, topic.taxo_topics.resources.sort) else assert_equal(value, topic.__send__("dc_#{name}")) end |