Sha256: 95597845bf5a874d9fabb223a2ce1ce69108f41179397938b24782d044f66804

Contents?: true

Size: 505 Bytes

Versions: 2

Compression:

Stored size: 505 Bytes

Contents

require 'spec_helper'
require 'integration/automatic_validation/spec_helper'

describe SailBoat do
  before :all do
    @model = SailBoat.new(:id => 1)
    @model.should be_valid_for_primitive_test
  end

  describe "with invlid value assigned to primitive column" do
    before :all do
      @model.build_date = 'ABC'
    end

    it "is invalid" do
      @model.should_not be_valid_for_primitive_test
      @model.errors.on(:build_date).should == [ 'Build date must be of type Date' ]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dm-validations-0.10.1 spec/integration/automatic_validation/inferred_primitive_validation_spec.rb
dm-validations-0.10.0 spec/integration/automatic_validation/inferred_primitive_validation_spec.rb