On 5/13/06, Mike Stok <mike / stok.ca> wrote: > > On 13-May-06, at 5:44 PM, Sy Ali wrote: > > > I'm playing with some test scripts, and I cannot for the life of me > > ensure that a block of code is run after every test is run. I can > > think of some ugly ways to do it.. but is there an elegant way which I > > missed? > > Does every test mean every test case? If so you might look at > Test::Unit::TestCase's teardown. No, not teardown.. I want to have some code executed after all testing has concluded. You'd think it'd be a matter of running it all at the end of the .rb file, but this is not true.. everything is run and _then_ the test cases are run. I suppose I could wrap the entire test in another ruby file.. it just seems strange to need to do this.