Corrected the last() compiler spec
This spec didn't match the correct nodes due to `1 < last()` always evaluating to true in this particular case.
This commit is contained in:
parent
7a4cb76d39
commit
94ec1b5f5d
|
@ -14,8 +14,9 @@ describe Oga::XPath::Compiler do
|
|||
evaluate_xpath(@document, 'root/a[last()]').should == node_set(@a2)
|
||||
end
|
||||
|
||||
it 'returns a NodeSet containing all but the last node' do
|
||||
evaluate_xpath(@document, 'root/a[1 < last()]').should == node_set(@a1)
|
||||
it 'returns a NodeSet matching all <a> nodes' do
|
||||
evaluate_xpath(@document, 'root/a[1 < last()]')
|
||||
.should == node_set(@a1, @a2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue