Class: RspecSequel::Matchers::ValidateNumericMatcher

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

Instance Method Summary collapse

Methods inherited from Validation

#additionnal_param_required?, #additionnal_param_type, #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

#descriptionObject



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

def description
  desc = "validate that #{@attribute.inspect} is a valid float"
  desc << " with option(s) #{hash_to_nice_string @options}" unless @options.empty?
  desc
end

#validation_typeObject



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

def validation_type
  :validates_numeric
end