Class: ComposableOperations::Matcher::Execution::HaltWhilePerforming
- Inherits:
-
Base
- Object
- Base
- ComposableOperations::Matcher::Execution::HaltWhilePerforming
show all
- Defined in:
- lib/composable_operations/matcher/execution.rb
Instance Method Summary
collapse
Methods inherited from Base
#and_return, #when_initialized_with
Instance Method Details
#because(message) ⇒ Object
171
172
173
174
|
# File 'lib/composable_operations/matcher/execution.rb', line 171
def because(message)
@message = message
self
end
|
#description ⇒ Object
176
177
178
179
180
181
182
|
# File 'lib/composable_operations/matcher/execution.rb', line 176
def description
description = "halt while performing"
description += " because #{message}" if message
description += " when initialized with custom input (#{input_as_text})" if input
description += " and return the expected result (#{result_as_text})" if result
description
end
|
#failure_message ⇒ Object
184
185
186
|
# File 'lib/composable_operations/matcher/execution.rb', line 184
def failure_message
"the operation did not halt while performing for the following reason(s):\n#{failure_reasons}"
end
|
#failure_message_when_negated ⇒ Object
188
189
190
|
# File 'lib/composable_operations/matcher/execution.rb', line 188
def failure_message_when_negated
"the operation was halted unexpectedly"
end
|
#matches?(operation) ⇒ Boolean
166
167
168
169
|
# File 'lib/composable_operations/matcher/execution.rb', line 166
def matches?(operation)
self.operation = operation
halted? && result_as_expected? && message_as_expected?
end
|