|
This is an abstract test case class for building Test::Unit unit tests for the WordNet class library. It consolidates most of the maintenance work that must be done to build a test file by adjusting the $LOAD_PATH to include the lib/ and ext/ directories, as well as adding some other useful methods that make building and maintaining the tests much easier (IMHO). See the docs for Test::Unit for more info on the particulars of unit testing.
# Allow the unit test to be run from the base dir, or from tests/ or # similar: begin require 'tests/fmtestcase' rescue require '../fmtestcase' end class MySomethingTest < WordNet::TestCase def setup super() @foo = 'bar' end
def test_00_something obj = nil assert_nothing_raised { obj = MySomething::new } assert_instance_of MySomething, obj assert_respond_to :myMethod, obj end end
$Id: wntestcase.rb,v 1.1 2003/08/06 08:05:39 deveiant Exp $
Copyright © 2002, 2003 The FaerieMUD Consortium. All rights reserved.
This module is free software. You may use, modify, and/or redistribute this software under the terms of the Perl Artistic License. (See language.perl.com/misc/Artistic.html)
Required files |
Classes and Modules |