class Shoulda::Matchers::ActiveModel::ValidateAcceptanceOfMatcher

@private

Public Class Methods

new(attribute) click to toggle source
Calls superclass method
# File lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb, line 84
def initialize(attribute)
  super
  @expected_message = :accepted
end

Public Instance Methods

matches?(subject) click to toggle source
Calls superclass method
# File lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb, line 89
def matches?(subject)
  super(subject)
  disallows_value_of(false, @expected_message)
end
simple_description() click to toggle source
# File lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb, line 94
def simple_description
  %(validate that :#{@attribute} has been set to "1")
end