Sha256: 2511eb098b88506cef2898b33707c85103cf477f2756f943fb8ec29d93d85c47
Contents?: true
Size: 539 Bytes
Versions: 14
Compression:
Stored size: 539 Bytes
Contents
require_relative '../../test_helper' class MachineFinderWithExistingOnSameClassTest < StateMachinesTest def setup @klass = Class.new @existing_machine = StateMachines::Machine.new(@klass) @machine = StateMachines::Machine.find_or_create(@klass) end def test_should_accept_a_block called = false StateMachines::Machine.find_or_create(@klass) do called = respond_to?(:event) end assert called end def test_should_not_create_a_new_machine assert_same @machine, @existing_machine end end
Version data entries
14 entries across 14 versions & 2 rubygems