Class: Roby::Test::ExecutionExpectations::IgnoreErrorsFrom
- Inherits:
-
Expectation
- Object
- Expectation
- Roby::Test::ExecutionExpectations::IgnoreErrorsFrom
- Defined in:
- lib/roby/test/execution_expectations.rb
Overview
Expectation wrapper that takes an expectation and ignores all errors that are related to it
Instance Attribute Summary
Attributes inherited from Expectation
Instance Method Summary collapse
- #filter_result(_result) ⇒ Object
-
#initialize(expectations, backtrace) ⇒ IgnoreErrorsFrom
constructor
A new instance of IgnoreErrorsFrom.
- #relates_to_error?(error) ⇒ Boolean
- #update_match(propagation_info) ⇒ Object
Methods inherited from Expectation
#explain_unachievable, #filter_result_with, #format_unachievable_explanation, #unachievable?
Constructor Details
#initialize(expectations, backtrace) ⇒ IgnoreErrorsFrom
Returns a new instance of IgnoreErrorsFrom.
833 834 835 836 |
# File 'lib/roby/test/execution_expectations.rb', line 833 def initialize(expectations, backtrace) super(backtrace) @expectations = Array(expectations) end |
Instance Method Details
#filter_result(_result) ⇒ Object
851 852 853 |
# File 'lib/roby/test/execution_expectations.rb', line 851 def filter_result(_result) nil end |
#relates_to_error?(error) ⇒ Boolean
845 846 847 848 849 |
# File 'lib/roby/test/execution_expectations.rb', line 845 def relates_to_error?(error) @expectations.any? do |e| e.relates_to_error?(error) end end |
#update_match(propagation_info) ⇒ Object
838 839 840 841 842 843 |
# File 'lib/roby/test/execution_expectations.rb', line 838 def update_match(propagation_info) # Call the underlying #update_match as some matchers cache # information there @expectations.each { |e| e.update_match(propagation_info) } true end |