class InvalidTransitionWithNamespaceTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/invalid_transition_test.rb, line 50 def setup @klass = Class.new @machine = StateMachine::Machine.new(@klass, :namespace => 'alarm') @state = @machine.state :active @machine.event :disable @object = @klass.new @object.state = 'active' @invalid_transition = StateMachine::InvalidTransition.new(@object, @machine, :disable) end
test_should_have_a_from_name()
click to toggle source
# File test/unit/invalid_transition_test.rb, line 70 def test_should_have_a_from_name assert_equal :active, @invalid_transition.from_name end
test_should_have_a_qualified_event()
click to toggle source
# File test/unit/invalid_transition_test.rb, line 66 def test_should_have_a_qualified_event assert_equal :disable_alarm, @invalid_transition.qualified_event end
test_should_have_a_qualified_from_name()
click to toggle source
# File test/unit/invalid_transition_test.rb, line 74 def test_should_have_a_qualified_from_name assert_equal :alarm_active, @invalid_transition.qualified_from_name end
test_should_have_an_event()
click to toggle source
# File test/unit/invalid_transition_test.rb, line 62 def test_should_have_an_event assert_equal :disable, @invalid_transition.event end