RSpec

Library providing tools for writing and running RSpec tests.

Class: RSpec::SleepingKingStudios::Matchers::ActiveModel::HaveErrors::ErrorExpectation

Parent Namespace
RSpec::SleepingKingStudios::Matchers::ActiveModel::HaveErrors
Inherited Classes
Struct > Object
Defined In
lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/error_expectation.rb

Table Of Contents

Overview

Stores an expectation of receiving an error for a specified attribute, as well as zero or more message expectations.

See Also

Since

Back To Top

Defined Under Namespace

Modules
MessagesMethods

Back To Top

Constructor

#initialize attribute, expected = true, received = false => ErrorExpectation

Parameters

Returns

Since

Back To Top

Instance Attributes

#attribute => Object

Returns the value of attribute attribute

Returns

#expected => Object

Returns the value of attribute expected

Returns

#messages => Array<MessageExpectation> (readonly)

The message expectations for the specified attribute. The returned array supports several additional methods: #expected, #missing, and #received.

Returns

See Also

Since

#received => Object

Returns the value of attribute received

Returns

Back To Top

Instance Methods

Back To Top


Back to Documentation | Versions | 2.8 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Matchers | RSpec::SleepingKingStudios::Matchers::ActiveModel | RSpec::SleepingKingStudios::Matchers::ActiveModel::HaveErrors