class BranchWithMultipleToRequirementsTest

Public Instance Methods

setup() click to toggle source
# File test/unit/branch_test.rb, line 173
def setup
  @object = Object.new
  @branch = StateMachine::Branch.new(:to => [:idling, :parked])
end
test_should_be_included_in_known_states() click to toggle source
# File test/unit/branch_test.rb, line 186
def test_should_be_included_in_known_states
  assert_equal [:idling, :parked], @branch.known_states
end
test_should_match_if_included() click to toggle source
# File test/unit/branch_test.rb, line 178
def test_should_match_if_included
  assert @branch.matches?(@object, :to => :idling)
end
test_should_not_match_if_not_included() click to toggle source
# File test/unit/branch_test.rb, line 182
def test_should_not_match_if_not_included
  assert !@branch.matches?(@object, :to => :first_gear)
end