summaryrefslogtreecommitdiff
path: root/test/rss/test_parser.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-31 16:10:53 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-31 16:10:53 +0000
commit976226b5de303ed852744c0291c280d1e5fd538f (patch)
tree088915bab077d20c8928cccfca6fb0eb2cf36347 /test/rss/test_parser.rb
parent35d62eb6a5f6521ed9297d99cb723a2efc85eb19 (diff)
* lib/rss/parser.rb (RSS::Parser): added @@default_parser. Used
XML parser became selectable. * test/rss/test_parser.rb: added tests for RSS::Parser.default_parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_parser.rb')
-rw-r--r--test/rss/test_parser.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rss/test_parser.rb b/test/rss/test_parser.rb
index 5701413..cc0263b 100644
--- a/test/rss/test_parser.rb
+++ b/test/rss/test_parser.rb
@@ -417,4 +417,14 @@ EOR
end
+ def test_default_parser
+ assert_nothing_raised() do
+ Parser.default_parser = RSS::AVAILABLE_PARSERS.first
+ end
+
+ assert_raise(RSS::NotValidXMLParser) do
+ Parser.default_parser = RSS::Parser
+ end
+ end
+
end