summaryrefslogtreecommitdiff
path: root/test/rexml/xpath
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 20:49:53 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 20:49:53 +0000
commit8257fcb1dbe7693f1a4e7dee47a0b35d1c62e270 (patch)
tree79b794d775a0c8321910c2a421ba0afd50d401f7 /test/rexml/xpath
parentb5321ba446584a8a464650d62f513b1f4b48d564 (diff)
rexml: Use more debug friendly assertion style
test/rexml/xpath/test_base.rb: Expand loop assertion and stop to checking just the first value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/xpath')
-rw-r--r--test/rexml/xpath/test_base.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/rexml/xpath/test_base.rb b/test/rexml/xpath/test_base.rb
index 044f0a33f0..7fb7e3f99a 100644
--- a/test/rexml/xpath/test_base.rb
+++ b/test/rexml/xpath/test_base.rb
@@ -860,11 +860,9 @@ module REXMLTests
</a>
XML
- for v,p in [[6, "sum(/a/b)"],
- [9, "sum(//b | //d)"],
- [3, "sum(/a/e/@*)"] ]
- assert_equal( v, XPath::match( d, p ).first )
- end
+ assert_equal([6], XPath::match(d, "sum(/a/b)"))
+ assert_equal([9], XPath::match(d, "sum(//b | //d)"))
+ assert_equal([3], XPath::match(d, "sum(/a/e/@*)"))
end
def test_xpath_namespace