On Monday 26 February 2007, Robert D. wrote:
On 2/26/07, Michael S. email@example.com wrote:
For a performance test I need to populate the database with a large
number of records. The individual test cases only read the database
contents. It is rather time consuming and, after all, unnecessary
to do a full setup and teardown for each test case. I’d much prefer
a clean way to do setup and teardown once for the entire TestCase
subclass. AFAIR, in JUnit, there is a decorator for just this
purpose. Is there something similar for Test::Unit?
class X < Test::Unit::TestCase
You’ve lost me there. I don’t understand how this is supposed to work,
in particular, how it achieves my aim of setting up and tearing down
the database only once per suite.
Are you using the initialization of the constant to set up the database?
I’m not sure that this approach plays nicely with multiple test suites
run by rake.