From: Michael Schuerig Date: 2007-02-27T04:13:06+09:00 Subject: Re: Test::Unit: setup per TestCase class or per suite On Monday 26 February 2007, Farrel Lifson wrote: > On 26/02/07, Michael Schuerig 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. > You should be able to put the data you need initialised only once in > the initialize method. I think. I don't think so. When I have class MyPerformanceTest < Test::Unit::TestCase def initialize ... end def test_something ... end def test_something_else ... end ... end for each of the individual test methods a fresh instance of MyPerformanceTest is created and initialized. Michael -- Michael Schuerig mailto:michael@schuerig.de http://www.schuerig.de/michael/