summaryrefslogtreecommitdiffstats
path: root/test/rss/test_maker_2.0.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-11 12:06:26 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-11 12:06:26 +0000
commite6eb9e35f17930fa6cf49d823a52fc4e8e3774c0 (patch)
treecb1d87a72fd558e9b97ac2f9811ce47bc5809a62 /test/rss/test_maker_2.0.rb
parent1f0dca2c56f3bb11d0eefda3e79a0a5a191d2940 (diff)
downloadruby-e6eb9e35f17930fa6cf49d823a52fc4e8e3774c0.tar.gz
ruby-e6eb9e35f17930fa6cf49d823a52fc4e8e3774c0.tar.xz
ruby-e6eb9e35f17930fa6cf49d823a52fc4e8e3774c0.zip
* lib/rss/maker.rb, lib/rss/maker/0.9.rb, lib/rss/maker/base.rb:
RSS::Maker.[] returns a maker class corresponds to passed version. * test/rss/test_maker_*.rb: add tests for RSS::Maker.[]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_maker_2.0.rb')
-rw-r--r--test/rss/test_maker_2.0.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/rss/test_maker_2.0.rb b/test/rss/test_maker_2.0.rb
index f6d4a11dc..9fe6543dd 100644
--- a/test/rss/test_maker_2.0.rb
+++ b/test/rss/test_maker_2.0.rb
@@ -4,6 +4,10 @@ require "rss/maker"
module RSS
class TestMaker20 < TestCase
+ def test_find_class
+ assert_equal(RSS::Maker::RSS20, RSS::Maker["2.0"])
+ assert_equal(RSS::Maker::RSS20, RSS::Maker["rss2.0"])
+ end
def test_rss
assert_raise(LocalJumpError) do