Module: ActiveStorageValidations::Matchers::ASVRspecable

Extended by:
ActiveSupport::Concern
Included in:
AspectRatioValidatorMatcher, AttachedValidatorMatcher, BaseSizeValidatorMatcher, ContentTypeValidatorMatcher, DimensionValidatorMatcher, LimitValidatorMatcher, ProcessableImageValidatorMatcher
Defined in:
lib/active_storage_validations/matchers/shared/asv_rspecable.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/active_storage_validations/matchers/shared/asv_rspecable.rb', line 14

def description
  raise NotImplementedError, "#{self.class} did not define #{__method__}"
end

#failure_messageObject

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/active_storage_validations/matchers/shared/asv_rspecable.rb', line 18

def failure_message
  raise NotImplementedError, "#{self.class} did not define #{__method__}"
end

#failure_message_when_negatedObject



22
23
24
# File 'lib/active_storage_validations/matchers/shared/asv_rspecable.rb', line 22

def failure_message_when_negated
  failure_message.sub(/is expected to validate/, 'is expected not to validate')
end

#initialize_rspecableObject



10
11
12
# File 'lib/active_storage_validations/matchers/shared/asv_rspecable.rb', line 10

def initialize_rspecable
  @failure_message_artefacts = []
end