class Roby::Test::ExecutionExpectations::NotEmitGeneratorModel
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 731 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
explain_unachievable(propagation_info)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 760 def explain_unachievable(propagation_info) @emitted_events.first end
relates_to_error?(error)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 764 def relates_to_error?(error) @related_error_matchers.any? { |match| match === error } end
to_s()
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 739 def to_s "no events matching #{@event_query} should be emitted" end
unachievable?(propagation_info)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 756 def unachievable?(propagation_info) !@emitted_events.empty? end
update_match(propagation_info)
click to toggle source
# File lib/roby/test/execution_expectations.rb, line 743 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