Module: NoBrainer::Matchers::Validations
- Included in:
- NoBrainer::Matchers
- Defined in:
- lib/matchers/validations.rb,
lib/matchers/validations/format_of.rb,
lib/matchers/validations/length_of.rb,
lib/matchers/validations/presence_of.rb,
lib/matchers/validations/exclusion_of.rb,
lib/matchers/validations/inclusion_of.rb,
lib/matchers/validations/acceptance_of.rb,
lib/matchers/validations/uniqueness_of.rb,
lib/matchers/validations/confirmation_of.rb,
lib/matchers/validations/numericality_of.rb
Defined Under Namespace
Classes: HaveValidationMatcher, ValidateConfirmationOfMatcher, ValidateExclusionOfMatcher, ValidateFormatOfMatcher, ValidateInclusionOfMatcher, ValidateLengthOfMatcher, ValidateNumericalityOfMatcher, ValidateUniquenessOfMatcher
Instance Method Summary
collapse
Instance Method Details
#validate_acceptance_of(field) ⇒ Object
6
7
8
|
# File 'lib/matchers/validations/acceptance_of.rb', line 6
def validate_acceptance_of(field)
HaveValidationMatcher.new(field, :acceptance)
end
|
#validate_confirmation_of(field) ⇒ Object
#validate_exclusion_of(field) ⇒ Object
68
69
70
|
# File 'lib/matchers/validations/format_of.rb', line 68
def validate_format_of(field)
ValidateFormatOfMatcher.new(field)
end
|
#validate_inclusion_of(field) ⇒ Object
#validate_length_of(field) ⇒ Object
122
123
124
|
# File 'lib/matchers/validations/length_of.rb', line 122
def validate_length_of(field)
ValidateLengthOfMatcher.new(field)
end
|
#validate_numericality_of(field) ⇒ Object
#validate_presence_of(field) ⇒ Object
6
7
8
|
# File 'lib/matchers/validations/presence_of.rb', line 6
def validate_presence_of(field)
HaveValidationMatcher.new(field, :presence)
end
|
#validate_uniqueness_of(field) ⇒ Object