class StateCollectionByDefaultTest

Public Instance Methods

setup() click to toggle source
# File test/unit/state_collection_test.rb, line 4
def setup
  @machine = StateMachine::Machine.new(Class.new)
  @states = StateMachine::StateCollection.new(@machine)
end
test_should_be_empty_by_priority() click to toggle source
# File test/unit/state_collection_test.rb, line 17
def test_should_be_empty_by_priority
  assert_equal [], @states.by_priority
end
test_should_have_a_machine() click to toggle source
# File test/unit/state_collection_test.rb, line 13
def test_should_have_a_machine
  assert_equal @machine, @states.machine
end
test_should_not_have_any_nodes() click to toggle source
# File test/unit/state_collection_test.rb, line 9
def test_should_not_have_any_nodes
  assert_equal 0, @states.length
end