1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/rexml/test_notationdecl_parsetest.rb: Remove setup because it

doesn't share anything with other tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2013-07-31 12:32:24 +00:00
parent a9c4b0f497
commit 5a5ede7359
2 changed files with 21 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Wed Jul 31 21:31:49 2013 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_notationdecl_parsetest.rb: Remove setup because it
doesn't share anything with other tests.
Wed Jul 31 21:24:55 2013 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_attributes_mixin.rb: Remove a needless shebang.

View file

@ -2,20 +2,26 @@ require 'test/unit'
require 'rexml/document'
class TestNotationDecl < Test::Unit::TestCase
def setup
doc_string = <<-'XMLEND'
<!DOCTYPE r SYSTEM "urn:x-henrikmartensson:test" [
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">
]>
<r/>
XMLEND
@doctype = REXML::Document.new(doc_string).doctype
INTERNAL_SUBSET
assert(doctype.notation('n1'), "Testing notation n1")
assert(doctype.notation('n2'), "Testing notation n2")
end
def test_notation
assert(@doctype.notation('n1'), "Testing notation n1")
assert(@doctype.notation('n2'), "Testing notation n2")
private
def xml(internal_subset)
<<-XML
<!DOCTYPE r SYSTEM "urn:x-henrikmartensson:test" [
#{internal_subset}
]>
<r/>
XML
end
def parse(internal_subset)
REXML::Document.new(xml(internal_subset)).doctype
end
end