Class: Roby::Test::ExecutionExpectations::IgnoreErrorsFrom

Inherits:
Expectation show all
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

#backtrace

Instance Method Summary collapse

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.



890
891
892
893
# File 'lib/roby/test/execution_expectations.rb', line 890

def initialize(expectations, backtrace)
    super(backtrace)
    @expectations = Array(expectations)
end

Instance Method Details

#filter_result(_result) ⇒ Object



908
909
910
# File 'lib/roby/test/execution_expectations.rb', line 908

def filter_result(_result)
    nil
end

#relates_to_error?(error) ⇒ Boolean

Returns:

  • (Boolean)


902
903
904
905
906
# File 'lib/roby/test/execution_expectations.rb', line 902

def relates_to_error?(error)
    @expectations.any? do |e|
        e.relates_to_error?(error)
    end
end

#update_match(propagation_info) ⇒ Object



895
896
897
898
899
900
# File 'lib/roby/test/execution_expectations.rb', line 895

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