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
Returns a new instance of Achieve.
1368
1369
1370
1371
1372
|
# File 'lib/roby/test/execution_expectations.rb', line 1368
def initialize(block, description, backtrace)
super(backtrace)
@description = description || @backtrace[0].to_s
@block = block
end
|
Instance Method Details
#return_object ⇒ Object
1378
1379
1380
|
# File 'lib/roby/test/execution_expectations.rb', line 1378
def return_object
@achieved
end
|
1382
1383
1384
1385
1386
1387
1388
|
# File 'lib/roby/test/execution_expectations.rb', line 1382
def to_s
if @description.respond_to?(:call)
@description.call
else
@description
end
end
|
#update_match(propagation_info) ⇒ Object
1374
1375
1376
|
# File 'lib/roby/test/execution_expectations.rb', line 1374
def update_match(propagation_info)
@achieved ||= @block.call(propagation_info)
end
|