Sha256: e0079da75991107694899ec823759061e0975cb50861bf833235ca7846bf7c38
Contents?: true
Size: 897 Bytes
Versions: 14
Compression:
Stored size: 897 Bytes
Contents
require_relative '../../test_helper' class BranchWithConflictingConditionalsTest < StateMachinesTest def setup @object = Object.new end def test_should_match_if_if_is_true_and_unless_is_false branch = StateMachines::Branch.new(if: lambda { true }, unless: lambda { false }) assert branch.match(@object) end def test_should_not_match_if_if_is_false_and_unless_is_true branch = StateMachines::Branch.new(if: lambda { false }, unless: lambda { true }) refute branch.match(@object) end def test_should_not_match_if_if_is_false_and_unless_is_false branch = StateMachines::Branch.new(if: lambda { false }, unless: lambda { false }) refute branch.match(@object) end def test_should_not_match_if_if_is_true_and_unless_is_true branch = StateMachines::Branch.new(if: lambda { true }, unless: lambda { true }) refute branch.match(@object) end end
Version data entries
14 entries across 14 versions & 2 rubygems