aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 20:48:28 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 20:48:28 +0000
commitc36d1f8d978b6a20bf81b500b51a1c5eded8b337 (patch)
tree9b54beb44e5b8bc05f6bd5a309f99c3b09cb7049
parent154798a3b9c61d751431d10e94ffd2abba8bde3a (diff)
downloadruby-c36d1f8d978b6a20bf81b500b51a1c5eded8b337.tar.gz
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
-rw-r--r--test/rexml/xpath/test_base.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/rexml/xpath/test_base.rb b/test/rexml/xpath/test_base.rb
index d9351e829e..044f0a33f0 100644
--- a/test/rexml/xpath/test_base.rb
+++ b/test/rexml/xpath/test_base.rb
@@ -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