Sha256: b879fed092b043ebff6b2a5198d6b94a00d9d4261fe05e9b073d49cb046b97a0
Contents?: true
Size: 775 Bytes
Versions: 14
Compression:
Stored size: 775 Bytes
Contents
require_relative '../../test_helper' class BranchWithoutGuardsTest < StateMachinesTest def setup @object = Object.new end def test_should_match_if_if_is_false branch = StateMachines::Branch.new(if: lambda { false }) assert branch.matches?(@object, guard: false) end def test_should_match_if_if_is_true branch = StateMachines::Branch.new(if: lambda { true }) assert branch.matches?(@object, guard: false) end def test_should_match_if_unless_is_false branch = StateMachines::Branch.new(unless: lambda { false }) assert branch.matches?(@object, guard: false) end def test_should_match_if_unless_is_true branch = StateMachines::Branch.new(unless: lambda { true }) assert branch.matches?(@object, guard: false) end end
Version data entries
14 entries across 14 versions & 2 rubygems