class Roby::Test::ExecutionExpectations::FailsToStart
Public Class Methods
new(task, reason, backtrace)
click to toggle source
Calls superclass method
Roby::Test::ExecutionExpectations::Expectation::new
# File lib/roby/test/execution_expectations.rb, line 960 def initialize(task, reason, backtrace) super(backtrace) @task = task @reason = reason if @reason && @reason.respond_to?(:to_execution_exception_matcher) @reason = @reason.to_execution_exception_matcher @related_error_matcher = LocalizedError.match.with_original_exception(@reason). to_execution_exception_matcher end end
Public Instance Methods
explain_unachievable(propagation_info)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 993 def explain_unachievable(propagation_info) "#{@task.failure_reason} does not match #{@reason}" end
relates_to_error?(exception)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 987 def relates_to_error?(exception) if @reason (@reason === exception) || (@related_error_matcher === exception) end end
return_object()
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 997 def return_object @task.failure_reason end
to_s()
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 1001 def to_s "#{@generator} should fail to start" end
unachievable?(propagation_info)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 981 def unachievable?(propagation_info) if @reason && @task.failed_to_start? !(@reason === @task.failure_reason) end end
update_match(propagation_info)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 971 def update_match(propagation_info) if !@task.failed_to_start? false elsif !@reason true else @reason === @task.failure_reason end end