Sha256: 26ecd1bff8c54efaf52360e7e2daecfcf51587d307bd797619c2c477fcd6c761
Contents?: true
Size: 586 Bytes
Versions: 14
Compression:
Stored size: 586 Bytes
Contents
require_relative '../../test_helper' class BranchWithMultipleIfConditionalsTest < StateMachinesTest def setup @object = Object.new end def test_should_match_if_all_are_true branch = StateMachines::Branch.new(if: [lambda { true }, lambda { true }]) assert branch.match(@object) end def test_should_not_match_if_any_are_false branch = StateMachines::Branch.new(if: [lambda { true }, lambda { false }]) refute branch.match(@object) branch = StateMachines::Branch.new(if: [lambda { false }, lambda { true }]) refute branch.match(@object) end end
Version data entries
14 entries across 14 versions & 2 rubygems