1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rss/maker.rb, lib/rss/maker/0.9.rb,

test/test_maker_*.rb: add RSS::Maker.supported?


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2009-05-16 09:22:55 +00:00
parent c5f0360c07
commit a687b15ff8
8 changed files with 50 additions and 0 deletions

View file

@ -4,6 +4,17 @@ require "rss/maker"
module RSS
class TestMaker09 < TestCase
def test_supported?
assert(RSS::Maker.supported?("0.9"))
assert(RSS::Maker.supported?("rss0.9"))
assert(RSS::Maker.supported?("0.91"))
assert(RSS::Maker.supported?("rss0.91"))
assert(RSS::Maker.supported?("0.92"))
assert(RSS::Maker.supported?("rss0.92"))
assert(!RSS::Maker.supported?("0.93"))
assert(!RSS::Maker.supported?("rss0.93"))
end
def test_find_class
assert_equal(RSS::Maker::RSS091, RSS::Maker["0.91"])
assert_equal(RSS::Maker::RSS091, RSS::Maker["rss0.91"])