class AttributeTransitionCollectionWithAroundCallbackBeforeYieldHaltTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/transition_collection_test.rb, line 1813 def setup @klass = Class.new @machine = StateMachine::Machine.new(@klass, :initial => :parked, :action => :save) @machine.state :idling @machine.event :ignite @machine.around_transition {throw :halt} @object = @klass.new @object.state_event = 'ignite' @transitions = StateMachine::AttributeTransitionCollection.new([ StateMachine::Transition.new(@object, @machine, :ignite, :parked, :idling) ]) @result = @transitions.perform end
test_should_not_clear_event()
click to toggle source
# File test/unit/transition_collection_test.rb, line 1835 def test_should_not_clear_event assert_equal :ignite, @object.state_event end
test_should_not_succeed()
click to toggle source
# File test/unit/transition_collection_test.rb, line 1831 def test_should_not_succeed assert_equal false, @result end
test_should_not_write_event_transition()
click to toggle source
# File test/unit/transition_collection_test.rb, line 1839 def test_should_not_write_event_transition assert_nil @object.send(:state_event_transition) end