Sha256: d9111a55c00b6c272e687612d562941d48b9c770cb5c5256df9559ae80f47c91
Contents?: true
Size: 510 Bytes
Versions: 1
Compression:
Stored size: 510 Bytes
Contents
require "spec_helper" describe Mongoid::Extensions::Float::Conversions do describe "#set" do context "when the string is a number" do it "converts the string to a float" do Float.set("3.45").should == 3.45 end end context "when the string is not a number" do it "returns the string" do Float.set("foo").should == "foo" end end end describe "#get" do it "returns the float" do Float.get(3.45).should == 3.45 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid-1.0.3 | spec/unit/mongoid/extensions/float/conversions_spec.rb |