class BranchWithExceptToRequirementTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/branch_test.rb, line 305 def setup @object = Object.new @branch = StateMachine::Branch.new(:except_to => :idling) end
test_should_be_included_in_known_states()
click to toggle source
# File test/unit/branch_test.rb, line 334 def test_should_be_included_in_known_states assert_equal [:idling], @branch.known_states end
test_should_ignore_from()
click to toggle source
# File test/unit/branch_test.rb, line 326 def test_should_ignore_from assert @branch.matches?(@object, :to => :parked, :from => :idling) end
test_should_ignore_on()
click to toggle source
# File test/unit/branch_test.rb, line 330 def test_should_ignore_on assert @branch.matches?(@object, :to => :parked, :on => :ignite) end
test_should_match_if_nil()
click to toggle source
# File test/unit/branch_test.rb, line 322 def test_should_match_if_nil assert @branch.matches?(@object, :to => nil) end
test_should_match_if_not_included()
click to toggle source
# File test/unit/branch_test.rb, line 314 def test_should_match_if_not_included assert @branch.matches?(@object, :to => :parked) end
test_should_not_match_if_included()
click to toggle source
# File test/unit/branch_test.rb, line 318 def test_should_not_match_if_included assert !@branch.matches?(@object, :to => :idling) end
test_should_use_a_blacklist_matcher()
click to toggle source
# File test/unit/branch_test.rb, line 310 def test_should_use_a_blacklist_matcher assert_instance_of StateMachine::BlacklistMatcher, @branch.state_requirements.first[:to] end