Sha256: db6f662313ead472746e0b105039e75b4d1382599a94b15276ab5b0a540d6dc6
Contents?: true
Size: 857 Bytes
Versions: 2
Compression:
Stored size: 857 Bytes
Contents
require 'spec_helper' require 'integration/numeric_validator/spec_helper' describe DataMapper::Validate::Fixtures::BasketballCourt do before :all do @model = DataMapper::Validate::Fixtures::BasketballCourt.valid_instance @model.valid? end it_should_behave_like "valid model" describe "with three point line distance of 6.8" do before :all do @model.three_point_line_distance = 6.8 @model.valid? end it_should_behave_like "valid model" end describe "with three point line distance of 10.0" do before :all do @model.three_point_line_distance = 10.0 @model.valid? end it_should_behave_like "invalid model" it "has a meaningful error message" do @model.errors.on(:three_point_line_distance).should == [ 'Three point line distance must be less than 7.24' ] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dm-validations-0.10.1 | spec/integration/numeric_validator/lt_with_float_type_spec.rb |
dm-validations-0.10.0 | spec/integration/numeric_validator/lt_with_float_type_spec.rb |