class ErrorByDefaultTest

Public Instance Methods

setup() click to toggle source
# File test/unit/error_test.rb, line 4
def setup
  @machine = StateMachine::Machine.new(Class.new)
  @collection = StateMachine::NodeCollection.new(@machine)
end
test_should_have_a_machine() click to toggle source
# File test/unit/error_test.rb, line 13
def test_should_have_a_machine
  assert_equal @machine, @collection.machine
end
test_should_index_by_name() click to toggle source
# File test/unit/error_test.rb, line 17
def test_should_index_by_name
  @collection << object = Struct.new(:name).new(:parked)
  assert_equal object, @collection[:parked]
end
test_should_not_have_any_nodes() click to toggle source
# File test/unit/error_test.rb, line 9
def test_should_not_have_any_nodes
  assert_equal 0, @collection.length
end