diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-31 12:44:24 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-31 12:44:24 +0000 |
commit | 3e04769926f302577c10310ec629b2f5c4a84d8d (patch) | |
tree | 9036128cb6c68d495091f2b7323e07b5c407803f /test/rexml/test_notationdecl_parsetest.rb | |
parent | 1251f51ee7ca784d923ad1400778885631063292 (diff) |
* test/rexml/test_notationdecl_parsetest.rb: Group tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/test_notationdecl_parsetest.rb')
-rw-r--r-- | test/rexml/test_notationdecl_parsetest.rb | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/test/rexml/test_notationdecl_parsetest.rb b/test/rexml/test_notationdecl_parsetest.rb index 78787a41ab..2f0836c817 100644 --- a/test/rexml/test_notationdecl_parsetest.rb +++ b/test/rexml/test_notationdecl_parsetest.rb @@ -2,20 +2,6 @@ require 'test/unit' require 'rexml/document' class TestNotationDecl < Test::Unit::TestCase - def test_name - doctype = parse("<!NOTATION name PUBLIC 'urn:public-id'>") - assert_equal("name", doctype.notation("name").name) - end - - def test_notation - doctype = parse(<<-INTERNAL_SUBSET) - <!NOTATION n1 PUBLIC "-//HM//NOTATION TEST1//EN" 'urn:x-henrikmartensson.org:test5'> - <!NOTATION n2 PUBLIC '-//HM//NOTATION TEST2//EN' "urn:x-henrikmartensson.org:test6"> - INTERNAL_SUBSET - assert(doctype.notation('n1'), "Testing notation n1") - assert(doctype.notation('n2'), "Testing notation n2") - end - private def xml(internal_subset) <<-XML @@ -29,4 +15,22 @@ class TestNotationDecl < Test::Unit::TestCase def parse(internal_subset) REXML::Document.new(xml(internal_subset)).doctype end + + class TestCommon < self + def test_name + doctype = parse("<!NOTATION name PUBLIC 'urn:public-id'>") + assert_equal("name", doctype.notation("name").name) + end + end + + class TestExternID < self + def test_notation + doctype = parse(<<-INTERNAL_SUBSET) + <!NOTATION n1 PUBLIC "-//HM//NOTATION TEST1//EN" 'urn:x-henrikmartensson.org:test5'> + <!NOTATION n2 PUBLIC '-//HM//NOTATION TEST2//EN' "urn:x-henrikmartensson.org:test6"> + INTERNAL_SUBSET + assert(doctype.notation('n1'), "Testing notation n1") + assert(doctype.notation('n2'), "Testing notation n2") + end + end end |