Module: Shoulda::Lotus::Matchers

Defined in:
lib/shoulda/lotus/matchers.rb,
lib/shoulda/lotus/matchers/allow_value_matcher.rb,
lib/shoulda/lotus/matchers/coerce_attribute_matcher.rb,
lib/shoulda/lotus/matchers/validate_length_of_matcher.rb,
lib/shoulda/lotus/matchers/validate_presence_of_matcher.rb,
lib/shoulda/lotus/matchers/validate_inclusion_of_matcher.rb

Defined Under Namespace

Classes: AllowValueMatcher, CoerceAttributeMatcher, Matcher, ValidateInclusionOfMatcher, ValidateLengthOfMatcher, ValidatePresenceOfMatcher

Instance Method Summary collapse

Instance Method Details

#allow_value(value) ⇒ Object



4
5
6
# File 'lib/shoulda/lotus/matchers/allow_value_matcher.rb', line 4

def allow_value(value)
  AllowValueMatcher.new(value)
end

#coerce_attribute(attribute) ⇒ Object



4
5
6
# File 'lib/shoulda/lotus/matchers/coerce_attribute_matcher.rb', line 4

def coerce_attribute(attribute)
  CoerceAttributeMatcher.new(attribute)
end

#validate_inclusion_of(attribute) ⇒ Object



4
5
6
# File 'lib/shoulda/lotus/matchers/validate_inclusion_of_matcher.rb', line 4

def validate_inclusion_of(attribute)
  ValidateInclusionOfMatcher.new(attribute)
end

#validate_length_of(attribute) ⇒ Object



4
5
6
# File 'lib/shoulda/lotus/matchers/validate_length_of_matcher.rb', line 4

def validate_length_of(attribute)
  ValidateLengthOfMatcher.new(attribute)
end

#validate_presence_of(attribute) ⇒ Object



4
5
6
# File 'lib/shoulda/lotus/matchers/validate_presence_of_matcher.rb', line 4

def validate_presence_of(attribute)
  ValidatePresenceOfMatcher.new(attribute)
end