diff --git a/spec/oga/xpath/evaluator/calls/sum_spec.rb b/spec/oga/xpath/evaluator/calls/sum_spec.rb index dadaf43..467a134 100644 --- a/spec/oga/xpath/evaluator/calls/sum_spec.rb +++ b/spec/oga/xpath/evaluator/calls/sum_spec.rb @@ -15,5 +15,9 @@ describe Oga::XPath::Evaluator do example 'return the sum of the child nodes of the 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