Sha256: 5087e782c0ddf3423a62f34ea6ee374e6f41e0e0081b8362a83767cc3b0eb50e
Contents?: true
Size: 838 Bytes
Versions: 15
Compression:
Stored size: 838 Bytes
Contents
require 'spec_helper' require 'integration/numeric_validator/spec_helper' describe 'DataMapper::Validations::Fixtures::BasketballCourt' do before :all do DataMapper::Validations::Fixtures::BasketballCourt.auto_migrate! @model = DataMapper::Validations::Fixtures::BasketballCourt.valid_instance @model.valid? end it_should_behave_like "valid model" describe "with length of 15.0" do before :all do @model.length = 15.0 @model.valid? end it_should_behave_like "valid model" end describe "with length of 14.0" do before :all do @model.length = 14.0 @model.valid? end it_should_behave_like "invalid model" it "has a meaningful error message" do @model.errors.on(:length).should == [ 'Length must be greater than or equal to 15.0' ] end end end
Version data entries
15 entries across 15 versions & 3 rubygems