Class: Roby::Test::ExecutionExpectations::Achieve
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, #relates_to_error?, #unachievable?
Constructor Details
#initialize(block, description, backtrace) ⇒ Achieve
1373
1374
1375
1376
1377
|
# File 'lib/roby/test/execution_expectations.rb', line 1373
def initialize(block, description, backtrace)
super(backtrace)
@description = description || @backtrace[0].to_s
@block = block
end
|
Instance Method Details
#return_object ⇒ Object
1383
1384
1385
|
# File 'lib/roby/test/execution_expectations.rb', line 1383
def return_object
@achieved
end
|
1387
1388
1389
1390
1391
1392
1393
|
# File 'lib/roby/test/execution_expectations.rb', line 1387
def to_s
if @description.respond_to?(:call)
@description.call
else
@description
end
end
|
#update_match(propagation_info) ⇒ Object
1379
1380
1381
|
# File 'lib/roby/test/execution_expectations.rb', line 1379
def update_match(propagation_info)
@achieved ||= @block.call(propagation_info)
end
|