class MachineCollectionTransitionsWithoutTransitionTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/machine_collection_test.rb, line 403 def setup @klass = Class.new @machines = StateMachine::MachineCollection.new @machines[:state] = @machine = StateMachine::Machine.new(@klass, :state, :initial => :parked, :action => :save) @machine.event :ignite do transition :parked => :idling end @object = @klass.new @object.state = 'idling' @object.state_event = 'ignite' @transitions = @machines.transitions(@object, :save) end
test_should_be_empty()
click to toggle source
# File test/unit/machine_collection_test.rb, line 418 def test_should_be_empty assert @transitions.empty? end
test_should_not_perform()
click to toggle source
# File test/unit/machine_collection_test.rb, line 422 def test_should_not_perform assert_equal false, @transitions.perform end