Skip to content

Commit 4413cab

Browse files
authored
Small fixes in xpath test (#338)
Fix syntax invalid xpath in test. Found while running xpath tests comparing with nokogiri
1 parent ceaa829 commit 4413cab

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/xpath/test_base.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ def test_axe_parent
251251
def test_axe_namespace_no_error
252252
$VERBOSE, verbose = nil, $VERBOSE
253253
# Although namespace axis is not implemented yet, it should not raise NoMethodError
254-
XPath.match(@@doc, "a/d/c/namespace::*")
254+
assert_nothing_raised do
255+
XPath.match(@@doc, "a/d/c/namespace::*")
256+
end
255257
ensure
256258
$VERBOSE = verbose
257259
end
@@ -883,7 +885,7 @@ def test_spaces
883885
assert_equal(["<c id='b'/>", "<c id='c'/>"],
884886
match.call(' / a / c [ ( @id ) ] '))
885887
assert_equal(["<c id='b'/>", "<c id='c'/>"],
886-
match.call('/ a / child:: c [( @id )] /'))
888+
match.call('/ a / child:: c [( @id )]'))
887889
end
888890

889891
def test_space_paren_brace_inside_xpath_string

0 commit comments

Comments
 (0)