Skip to content

Commit 4de2ac1

Browse files
tompngkou
andauthored
Apply suggestions of fixing test
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
1 parent 05ed61b commit 4de2ac1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/test_jaxen.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def process_test_case(name)
5757
# processes a tests/document/context node
5858
def process_context(doc, context)
5959
matched = XPath.match(doc, context.attributes["select"])
60-
assert_equal(matched.size, 1)
60+
assert_equal(1, matched.size)
6161
test_context = matched.first
6262
namespaces = context.namespaces
6363
namespaces.delete("var")
@@ -106,8 +106,9 @@ def process_nominal_test(context, variables, namespaces, test)
106106
end
107107

108108
XPath.each(test, "valueOf") do |value_of|
109-
assert_equal(1, matched.size)
110-
process_value_of(matched.first, variables, namespaces, value_of)
109+
matched.each do |subcontext|
110+
process_value_of(subcontext, variables, namespaces, value_of)
111+
end
111112
end
112113
end
113114

0 commit comments

Comments
 (0)