Module: ActiveStorageValidations::Matchers::Rspecable

Extended by:
ActiveSupport::Concern
Included in:
AspectRatioValidatorMatcher, AttachedValidatorMatcher, ContentTypeValidatorMatcher, DimensionValidatorMatcher, SizeValidatorMatcher
Defined in:
lib/active_storage_validations/matchers/concerns/rspecable.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject

Raises:

  • (NotImplementedError)


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

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

#failure_messageObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/active_storage_validations/matchers/concerns/rspecable.rb', line 16

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

#failure_message_when_negatedObject



20
21
22
# File 'lib/active_storage_validations/matchers/concerns/rspecable.rb', line 20

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

#initialize_rspecableObject



8
9
10
# File 'lib/active_storage_validations/matchers/concerns/rspecable.rb', line 8

def initialize_rspecable
  @failure_message_artefacts = []
end