Class: RspecSequel::Matchers::ValidateMinLengthMatcher

Inherits:
Validation
  • Object
show all
Defined in:
lib/rspec_sequel/matchers/validate_min_length.rb

Instance Method Summary collapse

Methods inherited from Validation

#additionnal_param_required?, #args_to_called_attributes, #initialize, #valid?, #valid_options

Methods inherited from Base

#failure_message, #failure_message_when_negated, #hash_to_nice_string, #initialize, #matches?

Constructor Details

This class inherits a constructor from RspecSequel::Validation

Instance Method Details

#additionnal_param_typeObject



11
12
13
# File 'lib/rspec_sequel/matchers/validate_min_length.rb', line 11

def additionnal_param_type
  Integer
end

#descriptionObject



5
6
7
8
9
# File 'lib/rspec_sequel/matchers/validate_min_length.rb', line 5

def description
  desc = "validate length of #{@attribute.inspect} is greater than or equal to #{@additionnal.inspect}"
  desc << " with option(s) #{hash_to_nice_string @options}" unless @options.empty?
  desc
end

#validation_typeObject



15
16
17
# File 'lib/rspec_sequel/matchers/validate_min_length.rb', line 15

def validation_type
  :validates_min_length
end