Class: Roby::Test::ExecutionExpectations::Quarantine

Inherits:
Expectation show all
Defined in:
lib/roby/test/execution_expectations.rb

Instance Attribute Summary

Attributes inherited from Expectation

#backtrace

Instance Method Summary collapse

Methods inherited from Expectation

#explain_unachievable, #filter_result, #filter_result_with, #format_unachievable_explanation, #unachievable?

Constructor Details

#initialize(task, backtrace) ⇒ Quarantine

Returns a new instance of Quarantine.



1166
1167
1168
1169
1170
1171
1172
1173
1174
# File 'lib/roby/test/execution_expectations.rb', line 1166

def initialize(task, backtrace)
    super(backtrace)
    @task = task

    @related_error_matcher =
        QuarantinedTaskError
            .match
            .to_execution_exception_matcher
end

Instance Method Details

#relates_to_error?(error) ⇒ Boolean

Returns:

  • (Boolean)


1180
1181
1182
# File 'lib/roby/test/execution_expectations.rb', line 1180

def relates_to_error?(error)
    @related_error_matcher === error
end

#to_sObject



1184
1185
1186
# File 'lib/roby/test/execution_expectations.rb', line 1184

def to_s
    "#{@task} should be quarantined"
end

#update_match(_propagation_info) ⇒ Object



1176
1177
1178
# File 'lib/roby/test/execution_expectations.rb', line 1176

def update_match(_propagation_info)
    @task.quarantined?
end