diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-19 20:49:53 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-19 20:49:53 +0000 |
commit | 8257fcb1dbe7693f1a4e7dee47a0b35d1c62e270 (patch) | |
tree | 79b794d775a0c8321910c2a421ba0afd50d401f7 /test | |
parent | b5321ba446584a8a464650d62f513b1f4b48d564 (diff) | |
download | ruby-8257fcb1dbe7693f1a4e7dee47a0b35d1c62e270.tar.gz |
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')
-rw-r--r-- | test/rexml/xpath/test_base.rb | 8 |
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 |