class StateContextTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/state_context_test.rb, line 13 def setup @klass = Class.new(Validateable) @machine = StateMachine::Machine.new(@klass, :initial => :parked) @state = @machine.state :parked @state_context = StateMachine::StateContext.new(@state) end
test_should_have_a_machine()
click to toggle source
# File test/unit/state_context_test.rb, line 21 def test_should_have_a_machine assert_equal @machine, @state_context.machine end
test_should_have_a_state()
click to toggle source
# File test/unit/state_context_test.rb, line 25 def test_should_have_a_state assert_equal @state, @state_context.state end