Sha256: f834efcc74c5a8f8bcd7cdf7caef28ba6eb38daf165fbe9596b126c18db5505b
Contents?: true
Size: 609 Bytes
Versions: 14
Compression:
Stored size: 609 Bytes
Contents
require_relative '../../test_helper' class TransitionWithActionTest < StateMachinesTest def setup @klass = Class.new do def save end end @machine = StateMachines::Machine.new(@klass, action: :save) @machine.state :parked, :idling @machine.event :ignite @object = @klass.new @object.state = 'parked' @transition = StateMachines::Transition.new(@object, @machine, :ignite, :parked, :idling) end def test_should_have_an_action assert_equal :save, @transition.action end def test_should_not_have_a_result assert_nil @transition.result end end
Version data entries
14 entries across 14 versions & 2 rubygems