diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-11 08:24:18 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-11 08:24:18 +0000 |
| commit | 44b86ef7ec1a9ba6eb65effd44541e4e3ab22ab0 (patch) | |
| tree | 93eaecbf2b894bf946ef21140348b613be7daefb /test/rss | |
| parent | 69002ff0b5cd4fdb2321b80f19961a94ec189c3a (diff) | |
| download | ruby-44b86ef7ec1a9ba6eb65effd44541e4e3ab22ab0.tar.gz ruby-44b86ef7ec1a9ba6eb65effd44541e4e3ab22ab0.tar.xz ruby-44b86ef7ec1a9ba6eb65effd44541e4e3ab22ab0.zip | |
* lib/rss/rss.rb (RSS::VERSION), test/rss/test_version.rb:
0.2.3 -> 0.2.4.
* lib/rss/maker.rb, lib/rss/maker/, test/rss/test_maker_2.0.rb:
fixed a bug that RSS::Maker.make("0.9")'s item doesn't make some
elements if description is missed.
Reported by Michael Auzenne. Thanks!!!
* lib/rss/maker/0.9.rb, test/rss/test_maker_0.9.rb:
RSS::Maker.make("0.9") generates RSS 0.92 not RSS 0.91.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss')
| -rw-r--r-- | test/rss/test_maker_0.9.rb | 2 | ||||
| -rw-r--r-- | test/rss/test_maker_2.0.rb | 29 | ||||
| -rw-r--r-- | test/rss/test_version.rb | 2 |
3 files changed, 31 insertions, 2 deletions
diff --git a/test/rss/test_maker_0.9.rb b/test/rss/test_maker_0.9.rb index df92945a8..c211bf605 100644 --- a/test/rss/test_maker_0.9.rb +++ b/test/rss/test_maker_0.9.rb @@ -13,7 +13,7 @@ module RSS setup_dummy_channel(maker) setup_dummy_image(maker) end - assert_equal("0.91", rss.rss_version) + assert_equal("0.92", rss.rss_version) rss = RSS::Maker.make("0.91") do |maker| setup_dummy_channel(maker) diff --git a/test/rss/test_maker_2.0.rb b/test/rss/test_maker_2.0.rb index 8fd9134f7..c338e343a 100644 --- a/test/rss/test_maker_2.0.rb +++ b/test/rss/test_maker_2.0.rb @@ -430,6 +430,35 @@ module RSS test_items(false) end + def test_pubDate_without_description + title = "TITLE" + link = "http://hoge.com/" + description = "text hoge fuga" + author = "oprah@oxygen.net" + pubDate = Time.now + + rss = RSS::Maker.make("2.0") do |maker| + setup_dummy_channel(maker) + + maker.items.new_item do |item| + item.title = title + item.link = link + # item.description = description + item.author = author + item.pubDate = pubDate + end + end + assert_equal(1, rss.items.size) + rss.channel.items.each_with_index do |item, i| + assert_equal(title, item.title) + assert_equal(link, item.link) + # assert_equal(description, item.description) + assert_equal(author, item.author) + assert_equal(pubDate, item.pubDate) + assert_equal(pubDate, item.date) + end + end + def test_guid isPermaLink = "true" content = "http://inessential.com/2002/09/01.php#a2" diff --git a/test/rss/test_version.rb b/test/rss/test_version.rb index 8f6771a4f..64f6f0482 100644 --- a/test/rss/test_version.rb +++ b/test/rss/test_version.rb @@ -3,7 +3,7 @@ require "rss-testcase" module RSS class TestVersion < TestCase def test_version - assert_equal("0.2.3", ::RSS::VERSION) + assert_equal("0.2.4", ::RSS::VERSION) end end end |
