From 27d2b6c2c3f3b7e78fe277b5ab6ba66c30b6c12b Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 27 Aug 2014 23:52:12 +0200 Subject: [PATCH] number() spec for converting empty strings. --- spec/oga/xpath/evaluator/calls/number_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/oga/xpath/evaluator/calls/number_spec.rb b/spec/oga/xpath/evaluator/calls/number_spec.rb index 231ec6d..887dfef 100644 --- a/spec/oga/xpath/evaluator/calls/number_spec.rb +++ b/spec/oga/xpath/evaluator/calls/number_spec.rb @@ -42,5 +42,9 @@ describe Oga::XPath::Evaluator do example 'return NaN for empty node sets' do @evaluator.evaluate('number(foo)').should be_nan end + + example 'return NaN for empty strings' do + @evaluator.evaluate('number("")').should be_nan + end end end