In my XCode project I have:
- controller
- (Singleton) databaseController
The databaseController is instantiated within the controller class.
How do I replace this databaseController with a mock object to verify proper functioning of the controller class without being dependent on the actual databaseController?
notes:
- OCUnit is used for unit testing.
- OCMock is used for creating Mock objects.
Bonus question: What if the databaseController wasn't a singleton?