Skip to content

Commit 68b0a40

Browse files
committed
XPath.match nil doc test case added
1 parent 0a50b94 commit 68b0a40

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/xpath/test_base.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ def test_root
100100
assert_equal "a", XPath::first( doc, "/" ).elements[1].name
101101
end
102102

103+
def test_nil_doc
104+
assert_raise(NoMethodError) {
105+
XPath.match(nil, '*')
106+
}
107+
end
108+
103109
def test_abbreviated_simple_child
104110
assert_equal "a", XPath::first(@@doc, "a").name
105111
end

0 commit comments

Comments
 (0)