to_float support for non String values

This commit is contained in:
Yorick Peterse committed 2015-08-19 20:14:22 +02:00
1 parent f3f3c7d31c
commit e3b45fddfc
2 files changed
+7 -5

No files matched your search

+6
View File
@@ -176,6 +176,12 @@ describe Oga::XPath::Conversion do
described_class.to_float(node).should == 10.5
end
end
describe 'using a NilClass' do
it 'returns Float::NAN' do
described_class.to_float(nil).should be_nan
end
end
end
describe 'to_boolean' do