summaryrefslogtreecommitdiff
path: root/test/rss/test_maker_1.0.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-08 12:58:36 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-08 12:58:36 +0000
commitbcf72db844b54492aca33b068711992bd73caccf (patch)
treea54da3329420c04614c460c3b45388951a790aa2 /test/rss/test_maker_1.0.rb
parent67c5b057e692b39c801aea811c6b75b40c4b8c22 (diff)
* 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
Diffstat (limited to 'test/rss/test_maker_1.0.rb')
-rw-r--r--test/rss/test_maker_1.0.rb84
1 files changed, 45 insertions, 39 deletions
diff --git a/test/rss/test_maker_1.0.rb b/test/rss/test_maker_1.0.rb
index 8f80f6e2fe..1fa86662e1 100644
--- a/test/rss/test_maker_1.0.rb
+++ b/test/rss/test_maker_1.0.rb
@@ -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