class BranchWithoutGuardsTest

Public Instance Methods

setup() click to toggle source
# File test/unit/branch_test.rb, line 732
def setup
  @object = Object.new
end
test_should_match_if_if_is_false() click to toggle source
# File test/unit/branch_test.rb, line 736
def test_should_match_if_if_is_false
  branch = StateMachine::Branch.new(:if => lambda {false})
  assert branch.matches?(@object, :guard => false)
end
test_should_match_if_if_is_true() click to toggle source
# File test/unit/branch_test.rb, line 741
def test_should_match_if_if_is_true
  branch = StateMachine::Branch.new(:if => lambda {true})
  assert branch.matches?(@object, :guard => false)
end
test_should_match_if_unless_is_false() click to toggle source
# File test/unit/branch_test.rb, line 746
def test_should_match_if_unless_is_false
  branch = StateMachine::Branch.new(:unless => lambda {false})
  assert branch.matches?(@object, :guard => false)
end
test_should_match_if_unless_is_true() click to toggle source
# File test/unit/branch_test.rb, line 751
def test_should_match_if_unless_is_true
  branch = StateMachine::Branch.new(:unless => lambda {true})
  assert branch.matches?(@object, :guard => false)
end