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 | 861b53017f8a46f1941d04d919781ced0d6459ec (patch) | |
| tree | 5623af540ba5ec4725bc9abb0d7427d2223a4b32 /test/rss | |
| parent | 8d71c2ddb4df24c78d0b72ca572a85b7aba688d6 (diff) | |
| download | ruby-861b53017f8a46f1941d04d919781ced0d6459ec.tar.gz ruby-861b53017f8a46f1941d04d919781ced0d6459ec.tar.xz ruby-861b53017f8a46f1941d04d919781ced0d6459ec.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@9556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss')
| -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 263606251..f5e8c5cca 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 0ece7b340..fda4c9407 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 |
