class ActiveModelTest::MachineWithStaticInitialStateTest

Public Instance Methods

setup() click to toggle source
# File test/unit/integrations/active_model_test.rb, line 143
def setup
  @model = new_model
  @machine = StateMachine::Machine.new(@model, :initial => :parked, :integration => :active_model)
end
test_should_set_initial_state_on_created_object() click to toggle source
# File test/unit/integrations/active_model_test.rb, line 148
def test_should_set_initial_state_on_created_object
  record = @model.new
  assert_equal 'parked', record.state
end