Class: ActiveStorageValidations::Matchers::TotalSizeValidatorMatcher

Inherits:
BaseSizeValidatorMatcher show all
Defined in:
lib/active_storage_validations/matchers/total_size_validator_matcher.rb

Instance Method Summary collapse

Methods inherited from BaseSizeValidatorMatcher

#between, #greater_than, #greater_than_or_equal_to, #initialize, #less_than, #less_than_or_equal_to, #matches?

Methods included from Rspecable

#failure_message_when_negated, #initialize_rspecable

Methods included from Messageable

#initialize_messageable, #with_message

Methods included from Contextable

#initialize_contextable, #on

Methods included from AllowBlankable

#allow_blank, #initialize_allow_blankable

Constructor Details

This class inherits a constructor from ActiveStorageValidations::Matchers::BaseSizeValidatorMatcher

Instance Method Details

#descriptionObject



12
13
14
# File 'lib/active_storage_validations/matchers/total_size_validator_matcher.rb', line 12

def description
  "validate total file size of :#{@attribute_name}"
end

#failure_messageObject



16
17
18
19
20
# File 'lib/active_storage_validations/matchers/total_size_validator_matcher.rb', line 16

def failure_message
  message = ["is expected to validate total file size of :#{@attribute_name}"]
  build_failure_message(message)
  message.join("\n")
end