TeensyMud - 'A ruby mud server.'

Browse repository
back

test_command.rb

# Code Generated by ZenTest v. 2.3.0
# classname: asrt / meth = ratio%
# Command: 7 / 4 = 175.00%

unless defined? $ZENTEST and $ZENTEST
require 'test/unit'
require 'flexmock'
load 'mockengine.rb'
require 'storage/properties'
require 'core/character'
require 'command'
end

class TestCommand < Test::Unit::TestCase
def setup
$id = 0
@c = Command.new(:cmd, "name", "help")
end

def test_cmd
assert_equal(:cmd, @c.cmd)
end

def test_name
assert_equal("name", @c.name)
end

def test_help
assert_equal("help", @c.help)
end

def test_singleton_Command_load
c, o = Command.load
assert(true,c && o)
a = GameObject.new("testthing",0)
assert_respond_to(a,:ocmd_echoat)
assert(true, c.insert(@c.name, @c))
assert_equal(@c, c.find_exact(@c.name))
end
end