On Mon, Apr 02, 2007 at 03:11:16AM +0900, Scott T. wrote:
You will have to require the file of the class you are testing.
He’s not testing any external class. He’s just writing a skeleton test
this point, to check he understands how Test::Unit works (a good
Also, I suspect that you aren’t testing a class named “Unit”.
If you are testing a class named “Array”, your class name would be
It doesn’t make the slightest difference. He can call his test class
‘Flurble’ by all means.
Anyway, who says that a unit test suite has to test only a single class?
Many useful tests under Test::Unit are really integration tests that
exercise a whole load of classes.
Another point to make: I don’t think you have to write an
“initialize” method at any point.
I always found it odd about Test::Unit that you define a ‘Class’ for
tests, when presumably only one instance of this class is ever
He doesn’t need that either; the test runner finds all the classes of
interest and creates the objects by itself.