class Shoulda::Matchers::ActiveModel::DisallowValueMatcher
@private
Attributes
allow_matcher[R]
Public Class Methods
new(value)
click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 11 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 34 def failure_message @allow_matcher.failure_message_when_negated end
Also aliased as: failure_message_for_should
failure_message_when_negated()
click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 39 def failure_message_when_negated @allow_matcher.failure_message end
Also aliased as: failure_message_for_should_not
for(attribute)
click to toggle source
# File lib/shoulda/matchers/active_model/disallow_value_matcher.rb, line 19 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 15 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 24 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 44 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 29 def with_message(message, options={}) @allow_matcher.with_message(message, options) self end