Sha256: e745af41cc107fffd1eddbe2d132ca3ca0b053925689df0d21b696e75e0c3167
Contents?: true
Size: 664 Bytes
Versions: 5
Compression:
Stored size: 664 Bytes
Contents
require_relative '../../test_helper' class MachineWithNilActionTest < StateMachinesTest def setup integration = Module.new do include StateMachines::Integrations::Base @defaults = { action: :save } end StateMachines::Integrations.const_set('Custom', integration) StateMachines::Integrations.register(StateMachines::Integrations::Custom) @machine = StateMachines::Machine.new(Class.new, action: nil, integration: :custom) end def test_should_have_a_nil_action assert_nil @machine.action end def teardown StateMachines::Integrations.reset StateMachines::Integrations.send(:remove_const, 'Custom') end end
Version data entries
5 entries across 5 versions & 1 rubygems