class PathWithoutTransitionsTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/path_test.rb, line 69 def setup @klass = Class.new @machine = StateMachine::Machine.new(@klass) @machine.state :parked, :idling @machine.event :ignite @object = @klass.new @path = StateMachine::Path.new(@object, @machine) @path.concat([ @ignite_transition = StateMachine::Transition.new(@object, @machine, :ignite, :parked, :idling) ]) end
test_should_not_be_able_to_walk_anywhere()
click to toggle source
# File test/unit/path_test.rb, line 83 def test_should_not_be_able_to_walk_anywhere walked = false @path.walk { walked = true } assert_equal false, walked end