Sha256: b870c60343d8441343157e9ace1209ed1532fd75975e2dfd3f99cef5bb8fa5ee
Contents?: true
Size: 926 Bytes
Versions: 1
Compression:
Stored size: 926 Bytes
Contents
require 'spec_helper' require 'integration/numeric_validator/spec_helper' describe 'DataMapper::Validate::Fixtures::BasketballCourt' do before :all do DataMapper::Validate::Fixtures::BasketballCourt.auto_migrate! @model = DataMapper::Validate::Fixtures::BasketballCourt.valid_instance @model.valid? end it_should_behave_like "valid model" describe "with three point line distance of 7.2" do before :all do @model.three_point_line_distance = 7.2 @model.valid? end it_should_behave_like "valid model" end describe "with three point line distance of 3.5" do before :all do @model.three_point_line_distance = 3.5 @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 greater than 6.7' ] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dm-validations-0.10.2 | spec/integration/numeric_validator/gt_with_float_type_spec.rb |