Sha256: 03b153463444d9d0c216179bf4cccbe05aebfa63d4ec8169293b5d315533b64e
Contents?: true
Size: 755 Bytes
Versions: 1
Compression:
Stored size: 755 Bytes
Contents
require 'spec_helper' describe 'DataMapper::Validate::GenericValidator' do describe "when types and fields are equal" do it "returns true" do DataMapper::Validate::RequiredFieldValidator.new(:name). should == DataMapper::Validate::RequiredFieldValidator.new(:name) end end describe "when types differ" do it "returns false" do DataMapper::Validate::RequiredFieldValidator.new(:name). should_not == DataMapper::Validate::UniquenessValidator.new(:name) end end describe "when property names differ" do it "returns false" do DataMapper::Validate::RequiredFieldValidator.new(:first_name). should_not == DataMapper::Validate::RequiredFieldValidator.new(:last_name) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dm-validations-0.10.2 | spec/unit/generic_validator/equality_operator_spec.rb |