* lib/rss/maker/base.rb (RSS::Maker::RSSBase#make): require block.
* test/rss/test_maker_{0.9,1.0,2.0}.rb: follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f6c7804c16
commit
7556f66e9c
@ -1,3 +1,8 @@
|
|||||||
|
Sun Jun 29 17:37:23 2008 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
|
* lib/rss/maker/base.rb (RSS::Maker::RSSBase#make): require block.
|
||||||
|
* test/rss/test_maker_{0.9,1.0,2.0}.rb: follow the above change.
|
||||||
|
|
||||||
Sun Jun 29 17:33:34 2008 Kouhei Sutou <kou@cozmixng.org>
|
Sun Jun 29 17:33:34 2008 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
* lib/rss/maker/base.rb, lib/rss/maker/itunes.rb: don't use
|
* lib/rss/maker/base.rb, lib/rss/maker/itunes.rb: don't use
|
||||||
|
@ -411,12 +411,8 @@ module RSS
|
|||||||
end
|
end
|
||||||
|
|
||||||
def make
|
def make
|
||||||
if block_given?
|
|
||||||
yield(self)
|
yield(self)
|
||||||
to_feed
|
to_feed
|
||||||
else
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_feed
|
def to_feed
|
||||||
|
@ -6,8 +6,9 @@ module RSS
|
|||||||
class TestMaker09 < TestCase
|
class TestMaker09 < TestCase
|
||||||
|
|
||||||
def test_rss
|
def test_rss
|
||||||
rss = RSS::Maker.make("0.91")
|
assert_raise(LocalJumpError) do
|
||||||
assert_nil(rss)
|
RSS::Maker.make("0.91")
|
||||||
|
end
|
||||||
|
|
||||||
rss = RSS::Maker.make("0.9") do |maker|
|
rss = RSS::Maker.make("0.9") do |maker|
|
||||||
setup_dummy_channel(maker)
|
setup_dummy_channel(maker)
|
||||||
|
@ -6,6 +6,10 @@ module RSS
|
|||||||
class TestMaker10 < TestCase
|
class TestMaker10 < TestCase
|
||||||
|
|
||||||
def test_rdf
|
def test_rdf
|
||||||
|
assert_raise(LocalJumpError) do
|
||||||
|
RSS::Maker.make("1.0")
|
||||||
|
end
|
||||||
|
|
||||||
rss = RSS::Maker.make("1.0") do |maker|
|
rss = RSS::Maker.make("1.0") do |maker|
|
||||||
setup_dummy_channel(maker)
|
setup_dummy_channel(maker)
|
||||||
setup_dummy_item(maker)
|
setup_dummy_item(maker)
|
||||||
@ -48,9 +52,6 @@ module RSS
|
|||||||
link = "http://hoge.com"
|
link = "http://hoge.com"
|
||||||
description = "fugafugafugafuga"
|
description = "fugafugafugafuga"
|
||||||
|
|
||||||
rss = RSS::Maker.make("1.0")
|
|
||||||
assert_nil(rss)
|
|
||||||
|
|
||||||
rss = RSS::Maker.make("1.0") do |maker|
|
rss = RSS::Maker.make("1.0") do |maker|
|
||||||
maker.channel.about = about
|
maker.channel.about = about
|
||||||
maker.channel.title = title
|
maker.channel.title = title
|
||||||
|
@ -6,8 +6,9 @@ module RSS
|
|||||||
class TestMaker20 < TestCase
|
class TestMaker20 < TestCase
|
||||||
|
|
||||||
def test_rss
|
def test_rss
|
||||||
rss = RSS::Maker.make("2.0")
|
assert_raise(LocalJumpError) do
|
||||||
assert_nil(rss)
|
RSS::Maker.make("2.0")
|
||||||
|
end
|
||||||
|
|
||||||
rss = RSS::Maker.make("2.0") do |maker|
|
rss = RSS::Maker.make("2.0") do |maker|
|
||||||
setup_dummy_channel(maker)
|
setup_dummy_channel(maker)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user