Class: Roby::Test::ExecutionExpectations::HaveFrameworkError
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(error_matcher, backtrace) ⇒ HaveFrameworkError
Returns a new instance of HaveFrameworkError.
1309
1310
1311
1312
|
# File 'lib/roby/test/execution_expectations.rb', line 1309
def initialize(error_matcher, backtrace)
super(backtrace)
@error_matcher = error_matcher
end
|
Instance Method Details
#relates_to_error?(error) ⇒ Boolean
1322
1323
1324
|
# File 'lib/roby/test/execution_expectations.rb', line 1322
def relates_to_error?(error)
@matched_exceptions.include?(error)
end
|
1326
1327
1328
|
# File 'lib/roby/test/execution_expectations.rb', line 1326
def to_s
"should have a framework error matching #{@error_matcher}"
end
|
#update_match(propagation_info) ⇒ Object
1314
1315
1316
1317
1318
1319
1320
|
# File 'lib/roby/test/execution_expectations.rb', line 1314
def update_match(propagation_info)
@matched_exceptions =
propagation_info
.framework_errors.map(&:first)
.find_all { |e| @error_matcher === e }
!@matched_exceptions.empty?
end
|