allending/Kiwi — pull request #427 by sharplet (2013-12-22 07:15:08+00:00)
Title: Add DSL for setup/teardown of entire test suite

This should hopefully address https://github.com/allending/Kiwi/issues/266. Works for both OCUnit and XCTest.

Example usage:

```objc
#import

CONFIG_START

beforeAllSpecs(^{
NSLog(@"BEFORE ALL SPECS");
});

afterAllSpecs(^{
NSLog(@"AFTER ALL SPECS");
});

CONFIG_END
```

(Add this code to a file `/Support/Config.m` and ensure it is part of your unit test bundle's Compile Sources build phase.)

I'd love to go further and add support for `beforeEachSpec`, `afterEachSpec`, `beforeEachExample` and `afterEachExample`, however it would be great to get feedback on this API first.