Sha256: 504a1012052539453a683c563178152af0416bc2eb85341063442070d8970a32

Contents?: true

Size: 551 Bytes

Versions: 6

Compression:

Stored size: 551 Bytes

Contents

require 'pathname'
require Pathname(__FILE__).dirname.expand_path.parent + 'spec_helper'

module DataMapper
  module Validate
    describe DataMapper::Validate::GenericValidator do
      describe "#==" do
        it "should return true if types and fields are equal" do
          RequiredFieldValidator.new(:name).should == RequiredFieldValidator.new(:name)
        end
        it "should return false of types differ" do
          RequiredFieldValidator.new(:name).should_not == UniquenessValidator.new(:name)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dm-validations-0.9.10 spec/integration/generic_validator_spec.rb
dm-validations-0.9.11 spec/integration/generic_validator_spec.rb
dm-validations-0.9.6 spec/integration/generic_validator_spec.rb
dm-validations-0.9.7 spec/integration/generic_validator_spec.rb
dm-validations-0.9.8 spec/integration/generic_validator_spec.rb
dm-validations-0.9.9 spec/integration/generic_validator_spec.rb