Class: RSpec::SleepingKingStudios::Matchers::ActiveModel::HaveErrors::MessageExpectation
- Inherits:
-
Struct
- Object
- Struct
- RSpec::SleepingKingStudios::Matchers::ActiveModel::HaveErrors::MessageExpectation
- Defined in:
- lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/message_expectation.rb
Overview
Stores an expectation of receiving a specified error message.
Instance Attribute Summary collapse
-
#expected ⇒ Object
Returns the value of attribute expected.
-
#message ⇒ Object
Returns the value of attribute message.
-
#received ⇒ Object
Returns the value of attribute received.
Instance Method Summary collapse
-
#initialize(message, expected = true, received = false) ⇒ MessageExpectation
constructor
A new instance of MessageExpectation.
Constructor Details
#initialize(message, expected = true, received = false) ⇒ MessageExpectation
Returns a new instance of MessageExpectation.
12 13 14 |
# File 'lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/message_expectation.rb', line 12 def initialize , expected = true, received = false super , expected, received end |
Instance Attribute Details
#expected ⇒ Object
Returns the value of attribute expected
7 8 9 |
# File 'lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/message_expectation.rb', line 7 def expected @expected end |
#message ⇒ Object
Returns the value of attribute message
7 8 9 |
# File 'lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/message_expectation.rb', line 7 def @message end |
#received ⇒ Object
Returns the value of attribute received
7 8 9 |
# File 'lib/rspec/sleeping_king_studios/matchers/active_model/have_errors/message_expectation.rb', line 7 def received @received end |