Sha256: 8d148baad14b574e5576f1448dcb9b254d70d1f58981eac08689331c658f1550
Contents?: true
Size: 604 Bytes
Versions: 14
Compression:
Stored size: 604 Bytes
Contents
require_relative '../../test_helper' class BranchWithMultipleUnlessConditionalsTest < StateMachinesTest def setup @object = Object.new end def test_should_match_if_all_are_false branch = StateMachines::Branch.new(unless: [lambda { false }, lambda { false }]) assert branch.match(@object) end def test_should_not_match_if_any_are_true branch = StateMachines::Branch.new(unless: [lambda { true }, lambda { false }]) refute branch.match(@object) branch = StateMachines::Branch.new(unless: [lambda { false }, lambda { true }]) refute branch.match(@object) end end
Version data entries
14 entries across 14 versions & 2 rubygems