class BranchWithMultipleExceptToRequirementsTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/branch_test.rb, line 340 def setup @object = Object.new @branch = StateMachine::Branch.new(:except_to => [:idling, :parked]) end
test_should_be_included_in_known_states()
click to toggle source
# File test/unit/branch_test.rb, line 353 def test_should_be_included_in_known_states assert_equal [:idling, :parked], @branch.known_states end
test_should_match_if_not_included()
click to toggle source
# File test/unit/branch_test.rb, line 345 def test_should_match_if_not_included assert @branch.matches?(@object, :to => :first_gear) end
test_should_not_match_if_included()
click to toggle source
# File test/unit/branch_test.rb, line 349 def test_should_not_match_if_included assert !@branch.matches?(@object, :to => :idling) end