class BranchWithExceptOnRequirementTest

Public Instance Methods

setup() click to toggle source
# File test/unit/branch_test.rb, line 359
def setup
  @object = Object.new
  @branch = StateMachine::Branch.new(:except_on => :ignite)
end
test_should_ignore_from() click to toggle source
# File test/unit/branch_test.rb, line 384
def test_should_ignore_from
  assert @branch.matches?(@object, :on => :park, :from => :parked)
end
test_should_ignore_to() click to toggle source
# File test/unit/branch_test.rb, line 380
def test_should_ignore_to
  assert @branch.matches?(@object, :on => :park, :to => :idling)
end
test_should_match_if_nil() click to toggle source
# File test/unit/branch_test.rb, line 376
def test_should_match_if_nil
  assert @branch.matches?(@object, :on => nil)
end
test_should_match_if_not_included() click to toggle source
# File test/unit/branch_test.rb, line 368
def test_should_match_if_not_included
  assert @branch.matches?(@object, :on => :park)
end
test_should_not_be_included_in_known_states() click to toggle source
# File test/unit/branch_test.rb, line 388
def test_should_not_be_included_in_known_states
  assert_equal [], @branch.known_states
end
test_should_not_match_if_included() click to toggle source
# File test/unit/branch_test.rb, line 372
def test_should_not_match_if_included
  assert !@branch.matches?(@object, :on => :ignite)
end
test_should_use_a_blacklist_matcher() click to toggle source
# File test/unit/branch_test.rb, line 364
def test_should_use_a_blacklist_matcher
  assert_instance_of StateMachine::BlacklistMatcher, @branch.event_requirement
end