Sha256: 0f8fe4463b53417c445778514e9424b65901456b0ab3527add6f4b2610811bc9

Contents?: true

Size: 751 Bytes

Versions: 14

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'

describe 'DataMapper::Validations::GenericValidator' do
  describe "when types and fields are equal" do
    it "returns true" do
      DataMapper::Validations::PresenceValidator.new(:name).
        should == DataMapper::Validations::PresenceValidator.new(:name)
    end
  end


  describe "when types differ" do
    it "returns false" do
      DataMapper::Validations::PresenceValidator.new(:name).
        should_not == DataMapper::Validations::UniquenessValidator.new(:name)
    end
  end


  describe "when property names differ" do
    it "returns false" do
      DataMapper::Validations::PresenceValidator.new(:first_name).
        should_not == DataMapper::Validations::PresenceValidator.new(:last_name)
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
ardm-validations-1.2.0 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.2.0 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.2.0.rc2 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.2.0.rc1 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.1.0 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.1.0.rc3 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.1.0.rc2 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.1.0.rc1 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.0.2 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.0.1 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.0.0 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.0.0.rc3 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.0.0.rc2 spec/unit/generic_validator/equality_operator_spec.rb
dm-validations-1.0.0.rc1 spec/unit/generic_validator/equality_operator_spec.rb