Skip to content

Commit eccf0f5

Browse files
committed
Ensure matching nodes for valueOf assertion to be always present
1 parent 4de2ac1 commit eccf0f5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/test_jaxen.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def process_nominal_test(context, variables, namespaces, test)
103103
assert_equal(Integer(expected, 10),
104104
matched.size,
105105
user_message(context, xpath, matched))
106+
else
107+
assert_operator(matched.size, :>, 0, user_message(context, xpath, matched))
106108
end
107109

108110
XPath.each(test, "valueOf") do |value_of|

0 commit comments

Comments
 (0)