class Shoulda::Matchers::ActiveModel::DisallowValueMatcher

@private

Public Class Methods

new(value) click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 6
def initialize(value)
  @allow_matcher = AllowValueMatcher.new(value)
end

Public Instance Methods

failure_message() click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 29
def failure_message
  @allow_matcher.failure_message_when_negated
end
Also aliased as: failure_message_for_should
failure_message_for_should()
Alias for: failure_message
failure_message_for_should_not()
failure_message_when_negated() click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 34
def failure_message_when_negated
  @allow_matcher.failure_message
end
for(attribute) click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 14
def for(attribute)
  @allow_matcher.for(attribute)
  self
end
matches?(subject) click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 10
def matches?(subject)
  !@allow_matcher.matches?(subject)
end
on(context) click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 19
def on(context)
  @allow_matcher.on(context)
  self
end
strict() click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 39
def strict
  @allow_matcher.strict
  self
end
with_message(message, options={}) click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 24
def with_message(message, options={})
  @allow_matcher.with_message(message, options)
  self
end