class BranchWithMultipleUnlessConditionalsTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/branch_test.rb, line 691 def setup @object = Object.new end
test_should_match_if_all_are_false()
click to toggle source
# File test/unit/branch_test.rb, line 695 def test_should_match_if_all_are_false branch = StateMachine::Branch.new(:unless => [lambda {false}, lambda {false}]) assert branch.match(@object) end
test_should_not_match_if_any_are_true()
click to toggle source
# File test/unit/branch_test.rb, line 700 def test_should_not_match_if_any_are_true branch = StateMachine::Branch.new(:unless => [lambda {true}, lambda {false}]) assert !branch.match(@object) branch = StateMachine::Branch.new(:unless => [lambda {false}, lambda {true}]) assert !branch.match(@object) end