Sha256: 013175fc506128fd00867f31174d3166f3725db3709039c388e8b3674ae38e46
Contents?: true
Size: 666 Bytes
Versions: 14
Compression:
Stored size: 666 Bytes
Contents
require_relative '../../test_helper' class MachineCollectionTransitionsWithTransitionTest < 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_event = 'ignite' @transitions = @machines.transitions(@object, :save) end def test_should_not_be_empty assert_equal 1, @transitions.length end def test_should_perform assert_equal true, @transitions.perform end end
Version data entries
14 entries across 14 versions & 2 rubygems