Sha256: 2135b563c6e46f26f875430b8b2c4c867b41daef1c4982538f0a9dc31c08d33d
Contents?: true
Size: 452 Bytes
Versions: 2
Compression:
Stored size: 452 Bytes
Contents
require 'spec_helper' describe RailsSettingsUi::ValueTypes::Float do describe "#cast" do it "should cast to float" do fixnum_type = RailsSettingsUi::ValueTypes::Float.new("99.21") expect(fixnum_type.cast).to eq(99.21) end end describe "if value not numeric" do it "should be not valid" do fixnum_type = RailsSettingsUi::ValueTypes::Float.new("qwerty") expect(fixnum_type.valid?).to be_false end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails-settings-ui-0.1.1 | spec/lib/rails-settings-ui/value_types/float_spec.rb |
rails-settings-ui-0.1.0 | spec/lib/rails-settings-ui/value_types/float_spec.rb |