Class: ComposableOperations::Matcher::Execution::SucceedToPerform
- Inherits:
-
Base
- Object
- Base
- ComposableOperations::Matcher::Execution::SucceedToPerform
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
#description ⇒ Object
67
68
69
70
71
72
|
# File 'lib/composable_operations/matcher/execution.rb', line 67
def description
description = "succeed to perform"
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
74
75
76
|
# File 'lib/composable_operations/matcher/execution.rb', line 74
def failure_message
"the operation failed to perform for the following reason(s):\n#{failure_reasons}"
end
|
#failure_message_when_negated ⇒ Object
Also known as:
negative_failure_message
78
79
80
|
# File 'lib/composable_operations/matcher/execution.rb', line 78
def failure_message_when_negated
"the operation succeeded unexpectedly"
end
|
#matches?(operation) ⇒ Boolean
62
63
64
65
|
# File 'lib/composable_operations/matcher/execution.rb', line 62
def matches?(operation)
self.operation = operation
succeeded? && result_as_expected?
end
|