Sha256: f69ebf37add6eef6dba762c2f3c2a5ce6ee08e663621b35bd4395af531c2d68a
Contents?: true
Size: 465 Bytes
Versions: 14
Compression:
Stored size: 465 Bytes
Contents
require_relative '../../test_helper' class CallbackWithIfConditionTest < StateMachinesTest def setup @object = Object.new end def test_should_call_if_true callback = StateMachines::Callback.new(:before, if: lambda { true }, do: lambda {}) assert callback.call(@object) end def test_should_not_call_if_false callback = StateMachines::Callback.new(:before, if: lambda { false }, do: lambda {}) refute callback.call(@object) end end
Version data entries
14 entries across 14 versions & 2 rubygems