summaryrefslogtreecommitdiff
path: root/test/rexml/xpath/test_base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rexml/xpath/test_base.rb')
-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