Sha256: c0d9fe7be620e593f7e8c8f75571dca3b17c38d026b0075683af1b05e4094325
Contents?: true
Size: 690 Bytes
Versions: 14
Compression:
Stored size: 690 Bytes
Contents
require_relative '../../test_helper' class MachineCollectionTransitionsWithoutTransitionTest < StateMachinesTest def setup @klass = Class.new @machines = StateMachines::MachineCollection.new @machines[:state] = @machine = StateMachines::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 def test_should_be_empty assert @transitions.empty? end def test_should_not_perform assert_equal false, @transitions.perform end end
Version data entries
14 entries across 14 versions & 2 rubygems