diff options
Diffstat (limited to 'test/rss/test_maker_2.0.rb')
-rw-r--r-- | test/rss/test_maker_2.0.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/rss/test_maker_2.0.rb b/test/rss/test_maker_2.0.rb index 605d439a68..8fd9134f70 100644 --- a/test/rss/test_maker_2.0.rb +++ b/test/rss/test_maker_2.0.rb @@ -353,7 +353,7 @@ module RSS assert_nil(rss.image) end - def test_items + def test_items(with_convenience_way=true) title = "TITLE" link = "http://hoge.com/" description = "text hoge fuga" @@ -407,7 +407,11 @@ module RSS end end maker.items.do_sort = Proc.new do |x, y| - y.title.content[-1] <=> x.title.content[-1] + if with_convenience_way + y.title[-1] <=> x.title[-1] + else + y.title {|t| t.content[-1]} <=> x.title {|t| t.content[-1]} + end end end assert_equal(item_size, rss.items.size) @@ -422,6 +426,10 @@ module RSS end end + def test_items_with_new_api_since_018 + test_items(false) + end + def test_guid isPermaLink = "true" content = "http://inessential.com/2002/09/01.php#a2" |