Fixed spec for sum() in a predicate
The return value of sum() should be used as a NodeSet index, not merely just a truthy value.
This commit is contained in:
parent
94ec1b5f5d
commit
37ac844ebe
|
@ -30,8 +30,8 @@ describe Oga::XPath::Compiler do
|
|||
end
|
||||
|
||||
describe 'in a predicate' do
|
||||
it 'returns a NodeSet containing all matching nodes' do
|
||||
evaluate_xpath(@document, 'root/a[sum(/root/*)]')
|
||||
it 'returns a NodeSet containing the first <a> node' do
|
||||
evaluate_xpath(@document, 'root/a[sum(/root/a)]')
|
||||
.should == node_set(@a1)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue