Class WordNet::TestCase
In: tests/wntestcase.rb
Parent: Test::Unit::TestCase

The abstract base class for WordNet test cases.

Methods
addSetupBlock    addTeardownBlock    assert_has_ivar    assert_ivar_equal    assert_not_respond_to    collectGarbage    debugMsg    debugMsg    inherited    message    message    printTestHeader    run    setup    teardown    writeLine   
Attributes
methodCounter  [RW] 
setupBlocks  [RW] 
teardownBlocks  [RW] 
Public Class methods
inherited( klass )

Inheritance callback — adds @setupBlocks and @teardownBlocks ivars and accessors to the inheriting class.

debugMsg( *msgs )

Output the specified msgs joined together to STDERR if $DEBUG is set.

message( *msgs )

Output the specified msgs joined together to STDOUT.

addSetupBlock( &block )

Add a setup block for the current testcase

addTeardownBlock( &block )

Add a teardown block for the current testcase

Public Instance methods
setup( *args )

Forward-compatibility method for namechange in Test::Unit

teardown( *args )

Forward-compatibility method for namechange in Test::Unit

message( *msgs )

Instance alias for the like-named class method.

debugMsg( *msgs )

Instance alias for the like-named class method

writeLine( length=75, char="-" )

Output a separator line made up of length of the specified char.

printTestHeader( desc )

Output a header for delimiting tests

collectGarbage()

Try to force garbage collection to start.

run( result )

Output the name of the test as it’s running if in verbose mode.

assert_not_respond_to( obj, meth )

Negative of assert_respond_to

assert_ivar_equal( value, object, sym )

Assert that the instance variable specified by sym of an object is equal to the specified value. The ’@’ at the beginning of the sym will be prepended if not present.

assert_has_ivar( sym, object )

Assert that the specified object has an instance variable which matches the specified sym. The ’@’ at the beginning of the sym will be prepended if not present.