class MachineCollectionTransitionsWithCustomOptionsTest

Public Instance Methods

setup() click to toggle source
# File test/unit/machine_collection_test.rb, line 530
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
  @transitions = @machines.transitions(@object, :save, :after => false)
end
test_should_use_custom_options() click to toggle source
# File test/unit/machine_collection_test.rb, line 543
def test_should_use_custom_options
  assert @transitions.skip_after
end