class StateFinalTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/state_test.rb, line 404 def setup @machine = StateMachine::Machine.new(Class.new) @machine.states << @state = StateMachine::State.new(@machine, :parked) end
test_should_be_final_with_input_transitions()
click to toggle source
# File test/unit/state_test.rb, line 413 def test_should_be_final_with_input_transitions @machine.event :park do transition :idling => :parked end assert @state.final? end
test_should_be_final_with_loopback()
click to toggle source
# File test/unit/state_test.rb, line 421 def test_should_be_final_with_loopback @machine.event :ignite do transition :parked => same end assert @state.final? end
test_should_be_final_without_input_transitions()
click to toggle source
# File test/unit/state_test.rb, line 409 def test_should_be_final_without_input_transitions assert @state.final? end