Module: RSpec::SleepingKingStudios::Matchers::ActiveModel::HaveErrors::ErrorExpectation::MessagesMethods Private
- Defined in:
- lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/error_expectation.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Extra instance methods for the :messages array.
Instance Method Summary collapse
-
#expected ⇒ Array<MessageExpectation>
private
Messages that are expected.
-
#missing ⇒ Array<MessageExpectation>
private
Messages that are expected but have not been received.
-
#received ⇒ Array<MessageExpectation>
private
Messages that have been received.
Instance Method Details
#expected ⇒ Array<MessageExpectation>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Messages that are expected.
19 20 21 |
# File 'lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/error_expectation.rb', line 19 def expected select { || .expected } end |
#missing ⇒ Array<MessageExpectation>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Messages that are expected but have not been received.
25 26 27 |
# File 'lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/error_expectation.rb', line 25 def missing select { || .expected && !.received } end |
#received ⇒ Array<MessageExpectation>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Messages that have been received.
30 31 32 |
# File 'lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/error_expectation.rb', line 30 def received select { || .received } end |