lib/rspec/sleeping_king_studios/matchers/active_model/have_errors_matcher.rb
# Adds an error expectation. If the actual object does not have an error on
# the specified attribute, #matches? will return false.
#
# @param [String, Symbol] attribute
#
# @return [HaveErrorsMatcher] self
#
# @example Setting an error expectation
#   expect(actual).to have_errors.on(:foo)
Adds an error expectation. If the actual object does not have an error on
the specified attribute, #matches. will return false.
Adds an error expectation . If the actual object does not have an error on the specified attribute #matches . will return false .
def on attribute
      @error_expectations << ErrorExpectation.new(attribute)
      self
    end
def on attribute @error_expectations << ErrorExpectation . new ( attribute ) self end
Adds an error expectation.
Adds an error expectation .
None
HaveErrorsMatcher
attribute
<not_specific>
<not_specific>
None
example
Setting an error expectation expect(actual).to have_errors.on(:foo)
Setting an error expectation expect ( actual ) . to have_errors . on ( : foo )