class TransitionWithoutReadingStateTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/transition_test.rb, line 252 def setup @klass = Class.new @machine = StateMachine::Machine.new(@klass) @machine.state :parked, :idling @machine.event :ignite @object = @klass.new @object.state = 'idling' @transition = StateMachine::Transition.new(@object, @machine, :ignite, :parked, :idling, false) end
test_should_have_to_value()
click to toggle source
# File test/unit/transition_test.rb, line 267 def test_should_have_to_value assert_equal 'idling', @transition.to end
test_should_not_read_from_value_from_object()
click to toggle source
# File test/unit/transition_test.rb, line 263 def test_should_not_read_from_value_from_object assert_equal 'parked', @transition.from end