Sha256: c3e70e53a0cde39eb793d4158c2cc797f20a770e64141be8fcc568af797bb3ac
Contents?: true
Size: 679 Bytes
Versions: 6
Compression:
Stored size: 679 Bytes
Contents
module Shoulda # :nodoc: module Matchers module ActiveModel # :nodoc: class DisallowValueMatcher # :nodoc: def initialize(value) @allow_matcher = AllowValueMatcher.new(value) end def matches?(subject) !@allow_matcher.matches?(subject) end def for(attribute) @allow_matcher.for(attribute) self end def with_message(message) @allow_matcher.with_message(message) self end def failure_message @allow_matcher.negative_failure_message end def allowed_types "" end end end end end
Version data entries
6 entries across 6 versions & 3 rubygems