lib/rspec/sleeping_king_studios/matchers/active_model/have_errors_matcher.rb
# Checks if the object can be validated, whether the object is valid, and
# checks the errors on the object against the expected errors and messages
# from #on and #with_message, if any.
#
# @param [Object] actual The object to test against the matcher.
#
# @return [Boolean] True if the object responds to :valid? and is valid
#   or object.errors does not match the specified errors and messages (if
#   any); otherwise false.
#
# @see #matches?
Checks if the object can be validated, whether the object is valid, and
checks the errors on the object against the expected errors and messages
from #on and #with_message, if any.
Checks if the object can be validated whether the object is valid and checks the errors on the object against the expected errors and messages from #on and #with_message if any .
def does_not_match? actual
      super
      @negative_expectation = true
      return false unless @validates = actual.respond_to?(:valid?)
      !matches?(actual)
    end
def does_not_match? actual super @negative_expectation = true return false unless @validates = actual . respond_to? ( :valid? ) ! matches? ( actual ) end
Checks if the object can be validated, whether the object is valid, and
checks the errors on the object against the expected errors and messages
from #on and #with_message, if any.
Checks if the object can be validated whether the object is valid and checks the errors on the object against the expected errors and messages from #on and #with_message if any .
True if the object responds to :valid. and is valid or object.errors does not match the specified errors and messages (if any); otherwise false.
True if the object responds to : valid . and is valid or object . errors does not match the specified errors and messages ( if any ) ; otherwise false .
Boolean
actual
<not_specific>
<not_specific>
actual The object to test against the matcher.
actual The object to test against the matcher .
see
None