From 876e1b87e7c0f2175932d7814c4ffbd272e01471 Mon Sep 17 00:00:00 2001 From: kou Date: Thu, 11 Dec 2008 12:06:26 +0000 Subject: * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rss/test_maker_1.0.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/rss/test_maker_1.0.rb') diff --git a/test/rss/test_maker_1.0.rb b/test/rss/test_maker_1.0.rb index 49d506bf6f..bee3206a3a 100644 --- a/test/rss/test_maker_1.0.rb +++ b/test/rss/test_maker_1.0.rb @@ -4,6 +4,10 @@ require "rss/maker" module RSS class TestMaker10 < TestCase + def test_find_class + assert_equal(RSS::Maker::RSS10, RSS::Maker["1.0"]) + assert_equal(RSS::Maker::RSS10, RSS::Maker["rss1.0"]) + end def test_rdf assert_raise(LocalJumpError) do -- cgit v1.2.3