When I test my app using OCUnit, it sets up the AppDelegate, window and rootViewController as usual before running the tests. My rootViewController then adds itself as an observer for some NSNotifications.
When I test these notifications with isolated test instances and mock observers, the notification handler of the automatically created rootViewController is called as well, which causes some of my tests to fail.
Is there a way to keep OCUnit from creating the rootViewController or make it use a different ViewController class when running in test mode? It would be cool if this could be done without writing special test-related code in my app code.