Sha256: 5d58b05ffa3d8a691d91dabe233c875dd84caa431c714e86c92f47e78dc371fc
Contents?: true
Size: 473 Bytes
Versions: 14
Compression:
Stored size: 473 Bytes
Contents
require_relative '../../test_helper' class MachineWithStatesWithCustomValuesTest < StateMachinesTest def setup @klass = Class.new @machine = StateMachines::Machine.new(@klass) @state = @machine.state :parked, value: 1 @object = @klass.new @object.state = 1 end def test_should_use_custom_value assert_equal 1, @state.value end def test_should_allow_lookup_by_custom_value assert_equal @state, @machine.states[1, :value] end end
Version data entries
14 entries across 14 versions & 2 rubygems