class Roby::Test::ExecutionExpectations::EmitGeneratorModel
Attributes
generator_model[R]
Public Class Methods
new(event_query, backtrace)
click to toggle source
Calls superclass method
Roby::Test::ExecutionExpectations::Expectation::new
# File lib/roby/test/execution_expectations.rb, line 772 def initialize(event_query, backtrace) super(backtrace) @event_query = event_query @generators = Array.new @related_error_matchers = Array.new @emitted_events = Array.new end
Public Instance Methods
relates_to_error?(error)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 801 def relates_to_error?(error) @related_error_matchers.any? { |match| match === error } end
return_object()
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 797 def return_object @emitted_events end
to_s()
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 780 def to_s "at least one event matching #{@event_query} should be emitted" end
update_match(propagation_info)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 784 def update_match(propagation_info) @emitted_events = propagation_info.emitted_events. find_all do |ev| if @event_query === ev.generator @generators << ev.generator @related_error_matchers << Queries::LocalizedErrorMatcher.new. with_origin(ev.generator). to_execution_exception_matcher end end !@emitted_events.empty? end