Parent

Class/Module Index [+]

Quicksearch

Shoulda::Matchers::ActiveModel::ValidationMatcher

@private

Attributes

failure_message[R]
failure_message_for_should[R]

Public Class Methods

new(attribute) click to toggle source
# File lib/shoulda/matchers/active_model/validation_matcher.rb, line 10
def initialize(attribute)
  @attribute = attribute
  @strict = false
  @failure_message = nil
  @failure_message_when_negated = nil
end

Public Instance Methods

failure_message_for_should_not() click to toggle source
failure_message_when_negated() click to toggle source
# File lib/shoulda/matchers/active_model/validation_matcher.rb, line 27
def failure_message_when_negated
  @failure_message_when_negated || @failure_message
end
matches?(subject) click to toggle source
# File lib/shoulda/matchers/active_model/validation_matcher.rb, line 32
def matches?(subject)
  @subject = subject
  false
end
on(context) click to toggle source
# File lib/shoulda/matchers/active_model/validation_matcher.rb, line 17
def on(context)
  @context = context
  self
end
strict() click to toggle source
# File lib/shoulda/matchers/active_model/validation_matcher.rb, line 22
def strict
  @strict = true
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.