class BranchWithExceptFromRequirementTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/branch_test.rb, line 251 def setup @object = Object.new @branch = StateMachine::Branch.new(:except_from => :parked) end
test_should_be_included_in_known_states()
click to toggle source
# File test/unit/branch_test.rb, line 280 def test_should_be_included_in_known_states assert_equal [:parked], @branch.known_states end
test_should_ignore_on()
click to toggle source
# File test/unit/branch_test.rb, line 276 def test_should_ignore_on assert @branch.matches?(@object, :from => :idling, :on => :ignite) end
test_should_ignore_to()
click to toggle source
# File test/unit/branch_test.rb, line 272 def test_should_ignore_to assert @branch.matches?(@object, :from => :idling, :to => :parked) end
test_should_match_if_nil()
click to toggle source
# File test/unit/branch_test.rb, line 268 def test_should_match_if_nil assert @branch.matches?(@object, :from => nil) end
test_should_match_if_not_included()
click to toggle source
# File test/unit/branch_test.rb, line 260 def test_should_match_if_not_included assert @branch.matches?(@object, :from => :idling) end
test_should_not_match_if_included()
click to toggle source
# File test/unit/branch_test.rb, line 264 def test_should_not_match_if_included assert !@branch.matches?(@object, :from => :parked) end
test_should_use_a_blacklist_matcher()
click to toggle source
# File test/unit/branch_test.rb, line 256 def test_should_use_a_blacklist_matcher assert_instance_of StateMachine::BlacklistMatcher, @branch.state_requirements.first[:from] end