class BranchWithMultipleFromRequirementsTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/branch_test.rb, line 110 def setup @object = Object.new @branch = StateMachine::Branch.new(:from => [:idling, :parked]) end
test_should_be_included_in_known_states()
click to toggle source
# File test/unit/branch_test.rb, line 123 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 115 def test_should_match_if_included assert @branch.matches?(@object, :from => :idling) end
test_should_not_match_if_not_included()
click to toggle source
# File test/unit/branch_test.rb, line 119 def test_should_not_match_if_not_included assert !@branch.matches?(@object, :from => :first_gear) end