Module: Mockolate::Validators

Defined in:
lib/mockolate/validators.rb

Class Method Summary collapse

Class Method Details

.check_faker(obj) ⇒ Object



10
11
12
# File 'lib/mockolate/validators.rb', line 10

def check_faker(obj)

end

.check_value_given?(obj) ⇒ Boolean

Returns:

  • (Boolean)

Raises:



5
6
7
8
# File 'lib/mockolate/validators.rb', line 5

def check_value_given?(obj)
  return if _check_has_default_value?(obj) || _check_both_given?(obj)
  raise Mockolate::Errors::MissingValueError, 'Default value or all Faker options should be given'
end