Ruby Minitest: Suite- or Class- level setup?

Viewed 7173

Using the built-in Ruby Minitest framework, is there a way to run some code once before the entire suite runs, or even once before an entire TestClass runs? I see in the answer to this question that Test::Unit::after_tests can be used to run code after all tests have been run; is there a similar method to run code before all tests have run?

I would like to use this functionality to initialize a test database before the tests run and tear it down after they have all run.

Thanks!

2 Answers
Related