XPath specs for wildcard names + namespaces.

This commit is contained in:
Yorick Peterse 2014-07-09 23:55:09 +02:00
parent 8fbc582547
commit a61540cfc5
1 changed files with 22 additions and 0 deletions

View File

@ -65,4 +65,26 @@ describe Oga::XPath::Evaluator do
@set[0].namespace.should == 'ns1'
end
end
context 'name and namespace wildcards' do
before do
@set = @evaluator.evaluate('a/*:*')
end
example 'return the right amount of rows' do
@set.length.should == 3
end
example 'include the first <b> node' do
@set[0].name.should == 'b'
end
example 'include the second <b> node' do
@set[1].name.should == 'b'
end
example 'include the <c> node' do
@set[2].name.should == 'c'
end
end
end