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

rexml: Use more debug friendly assertion style

test/rexml/xpath/test_base.rb: Stop to use separated assertions for
checking array value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2018-04-19 20:48:28 +00:00
parent be000dcc15
commit b5321ba446

View file

@ -706,8 +706,8 @@ module REXMLTests
XML
d = REXML::Document.new( source )
r = REXML::XPath.match( d, %q{/a/*/*[1]} )
assert_equal( 1, r.size )
r.each { |el| assert_equal( '1', el.attribute('id').value ) }
assert_equal(["1"],
r.collect {|element| element.attribute("id").value})
end
def test_descendant_or_self_ordering
@ -841,9 +841,8 @@ module REXMLTests
</a>
EOL
d = REXML::Document.new( string )
c1 = XPath.match( d, '/a/*/*[1]' )
assert_equal( 1, c1.length )
assert_equal( 'c1', c1[0].name )
cs = XPath.match( d, '/a/*/*[1]' )
assert_equal(["c1"], cs.collect(&:name))
end
def test_sum