Class: ActiveOperation::Matcher::Execution::SucceedToPerform
- Inherits:
-
Base
- Object
- Base
- ActiveOperation::Matcher::Execution::SucceedToPerform
show all
- Defined in:
- lib/active_operation/matcher/execution.rb
Instance Method Summary
collapse
Methods inherited from Base
#and_return, #when_initialized_with
Instance Method Details
#description ⇒ Object
78
79
80
81
82
83
|
# File 'lib/active_operation/matcher/execution.rb', line 78
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
85
86
87
|
# File 'lib/active_operation/matcher/execution.rb', line 85
def failure_message
"the operation failed to perform for the following reason(s):\n#{failure_reasons}"
end
|
#failure_message_when_negated ⇒ Object
89
90
91
|
# File 'lib/active_operation/matcher/execution.rb', line 89
def failure_message_when_negated
"the operation succeeded unexpectedly"
end
|
#matches?(operation) ⇒ Boolean
73
74
75
76
|
# File 'lib/active_operation/matcher/execution.rb', line 73
def matches?(operation)
self.operation = operation
succeeded? && result_as_expected?
end
|