mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss, test/rss, sample/rss: backported from CVS HEAD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
67c5b057e6
commit
bcf72db844
30 changed files with 1967 additions and 990 deletions
|
@ -85,37 +85,41 @@ module RSS
|
|||
link = "http://hoge.com"
|
||||
description = "fugafugafugafuga"
|
||||
|
||||
rss = RSS::Maker.make("1.0") do |maker|
|
||||
# maker.channel.about = about
|
||||
maker.channel.title = title
|
||||
maker.channel.link = link
|
||||
maker.channel.description = description
|
||||
assert_not_set_error("maker.channel", %w(about)) do
|
||||
RSS::Maker.make("1.0") do |maker|
|
||||
# maker.channel.about = about
|
||||
maker.channel.title = title
|
||||
maker.channel.link = link
|
||||
maker.channel.description = description
|
||||
end
|
||||
end
|
||||
assert_nil(rss)
|
||||
|
||||
rss = RSS::Maker.make("1.0") do |maker|
|
||||
maker.channel.about = about
|
||||
# maker.channel.title = title
|
||||
maker.channel.link = link
|
||||
maker.channel.description = description
|
||||
assert_not_set_error("maker.channel", %w(title)) do
|
||||
RSS::Maker.make("1.0") do |maker|
|
||||
maker.channel.about = about
|
||||
# maker.channel.title = title
|
||||
maker.channel.link = link
|
||||
maker.channel.description = description
|
||||
end
|
||||
end
|
||||
assert_nil(rss)
|
||||
|
||||
rss = RSS::Maker.make("1.0") do |maker|
|
||||
maker.channel.about = about
|
||||
maker.channel.title = title
|
||||
# maker.channel.link = link
|
||||
maker.channel.description = description
|
||||
assert_not_set_error("maker.channel", %w(link)) do
|
||||
RSS::Maker.make("1.0") do |maker|
|
||||
maker.channel.about = about
|
||||
maker.channel.title = title
|
||||
# maker.channel.link = link
|
||||
maker.channel.description = description
|
||||
end
|
||||
end
|
||||
assert_nil(rss)
|
||||
|
||||
rss = RSS::Maker.make("1.0") do |maker|
|
||||
maker.channel.about = about
|
||||
maker.channel.title = title
|
||||
maker.channel.link = link
|
||||
# maker.channel.description = description
|
||||
assert_not_set_error("maker.channel", %w(description)) do
|
||||
RSS::Maker.make("1.0") do |maker|
|
||||
maker.channel.about = about
|
||||
maker.channel.title = title
|
||||
maker.channel.link = link
|
||||
# maker.channel.description = description
|
||||
end
|
||||
end
|
||||
assert_nil(rss)
|
||||
end
|
||||
|
||||
|
||||
|
@ -138,14 +142,15 @@ module RSS
|
|||
assert_equal(link, image.link)
|
||||
assert_equal(url, image.url)
|
||||
|
||||
rss = RSS::Maker.make("1.0") do |maker|
|
||||
# setup_dummy_channel(maker)
|
||||
maker.channel.link = link
|
||||
|
||||
maker.image.title = title
|
||||
maker.image.url = url
|
||||
assert_not_set_error("maker.channel", %w(about title description)) do
|
||||
RSS::Maker.make("1.0") do |maker|
|
||||
# setup_dummy_channel(maker)
|
||||
maker.channel.link = link
|
||||
|
||||
maker.image.title = title
|
||||
maker.image.url = url
|
||||
end
|
||||
end
|
||||
assert_nil(rss)
|
||||
end
|
||||
|
||||
def test_not_valid_image
|
||||
|
@ -173,15 +178,16 @@ module RSS
|
|||
assert_nil(rss.channel.image)
|
||||
assert_nil(rss.image)
|
||||
|
||||
rss = RSS::Maker.make("1.0") do |maker|
|
||||
setup_dummy_channel(maker)
|
||||
# maker.channel.link = link
|
||||
maker.channel.link = nil
|
||||
|
||||
maker.image.url = url
|
||||
maker.image.title = title
|
||||
assert_not_set_error("maker.channel", %w(link)) do
|
||||
RSS::Maker.make("1.0") do |maker|
|
||||
setup_dummy_channel(maker)
|
||||
# maker.channel.link = link
|
||||
maker.channel.link = nil
|
||||
|
||||
maker.image.url = url
|
||||
maker.image.title = title
|
||||
end
|
||||
end
|
||||
assert_nil(rss)
|
||||
end
|
||||
|
||||
def test_items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue