Sha256: 8120d6e981883e614b6a0e6ca575ace57d7dc01b6463f0b909b98e8e41148754
Contents?: true
Size: 402 Bytes
Versions: 19
Compression:
Stored size: 402 Bytes
Contents
require_relative 'test_helper' class MachineWithDynamicInitialStateTest < BaseTestCase def setup @model = new_model @machine = StateMachines::Machine.new(@model, initial: lambda { |_object| :parked }, integration: :active_model) @machine.state :parked end def test_should_set_initial_state_on_created_object record = @model.new assert_equal 'parked', record.state end end
Version data entries
19 entries across 19 versions & 2 rubygems