class StateMachinesRspec::Matchers::HandleEventMatcher
Public Instance Methods
description()
click to toggle source
Calls superclass method
StateMachinesRspec::Matchers::Events::Matcher#description
# File lib/matchers/events/handle_event.rb, line 15 def description message = super message << " on #{state_machine_scope.inspect}" if state_machine_scope "handle #{message}" end
matches_events?(events)
click to toggle source
# File lib/matchers/events/handle_event.rb, line 11 def matches_events?(events) !invalid_events? end
Private Instance Methods
invalid_events?()
click to toggle source
# File lib/matchers/events/handle_event.rb, line 23 def invalid_events? invalid_events = @introspector.invalid_events(@events) unless invalid_events.empty? @failure_message = "Expected to be able to handle events: " + "#{invalid_events.join(', ')} in state: " + "#{@introspector.current_state_value}" end !invalid_events.empty? end