Extra test for sum() for default return values.

This commit is contained in:
Yorick Peterse 2014-08-27 23:07:38 +02:00
parent 30a5d01ebd
commit 022d8e0ada
1 changed files with 4 additions and 0 deletions

View File

@ -15,5 +15,9 @@ describe Oga::XPath::Evaluator do
example 'return the sum of the child nodes of the <root> node' do
@evaluator.evaluate('sum(root/*)').should == 3.0
end
example 'return zero by default' do
@evaluator.evaluate('sum(foo)').should be_zero
end
end
end