Class: Remarkable::ActiveRecord::Matchers::ValidateAcceptanceOfMatcher

Inherits:
Matcher::Base
  • Object
show all
Includes:
Helpers
Defined in:
lib/remarkable/active_record/macros/validations/validate_acceptance_of_matcher.rb

Instance Method Summary collapse

Methods included from Helpers

#allow_blank, #allow_nil, #message

Methods included from Default::Helpers

#assert_contains, #assert_does_not_contain

Methods inherited from Matcher::Base

#failure_message, #negative, #negative_failure_message, #spec

Methods included from Matcher::DSL

included, #matches?

Instance Method Details

#descriptionObject



13
14
15
16
17
# File 'lib/remarkable/active_record/macros/validations/validate_acceptance_of_matcher.rb', line 13

def description
  message = "require #{@attributes.to_sentence} to be accepted"
  message << " or nil" if @options[:nil]
  message
end