I have the following problem. I want to execute a piece of code before all test classes are executed. For instance: I don\'t want my game to use the SoundEngine singleton du
From Writing Test Classes and Methods:
You can optionally add customized methods for class setup
(+ (void)setUp)
and teardown(+ (void)tearDown)
as well, which run before and after all of the test methods in the class.
In Swift that would be class
methods:
override class func setUp() {
super.setUp()
// Called once before all tests are run
}
override class func tearDown() {
// Called once after all tests are run
super.tearDown()
}