to_float support for non String values
This commit is contained in:
1 parent
f3f3c7d31c
commit
e3b45fddfc
2 files changed
+7
-5
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user