From 9ce40aacef33a9bcb7c565f2fc0bfd493bf73088 Mon Sep 17 00:00:00 2001 From: kou Date: Tue, 7 Dec 2010 12:10:23 +0000 Subject: * lib/rexml/doctype.rb, test/rexml/test_doctype.rb: suppress warnings. [ruby-core:33305] Reported by Aaron Patterson. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rexml/test_doctype.rb | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'test/rexml/test_doctype.rb') diff --git a/test/rexml/test_doctype.rb b/test/rexml/test_doctype.rb index f40f833d07..20603f5378 100644 --- a/test/rexml/test_doctype.rb +++ b/test/rexml/test_doctype.rb @@ -65,3 +65,43 @@ class TestDocTypeAccessor < Test::Unit::TestCase end end + +class TestNotationDeclPublic < Test::Unit::TestCase + def setup + @name = "vrml" + @id = "VRML 1.0" + @uri = "http://www.web3d.org/" + end + + def test_to_s + assert_equal("", + decl(@id, nil).to_s) + end + + def test_to_s_with_uri + assert_equal("", + decl(@id, @uri).to_s) + end + + private + def decl(id, uri) + REXML::NotationDecl.new(@name, "PUBLIC", id, uri) + end +end + +class TestNotationDeclSystem < Test::Unit::TestCase + def setup + @name = "gif" + @id = "gif viewer" + end + + def test_to_s + assert_equal("", + decl(@id).to_s) + end + + private + def decl(id) + REXML::NotationDecl.new(@name, "SYSTEM", id, nil) + end +end -- cgit v1.2.3