Eval specs for the self axis short form.

This commit is contained in:
Yorick Peterse 2014-08-11 09:35:01 +02:00
parent ffcefa92a7
commit f4ae83498e
1 changed files with 12 additions and 0 deletions

View File

@ -26,5 +26,17 @@ describe Oga::XPath::Evaluator do
it_behaves_like :empty_node_set
end
context 'matching the context node itself using the short form' do
before do
@set = @evaluator.evaluate('a/.')
end
it_behaves_like :node_set, :length => 1
example 'return the <a> node' do
@set[0].should == @document.children[0]
end
end
end
end