Search code examples
objective-cunit-testingmockingclass-methodocmock

Objective C & OC Mock - Mocking a class method?


I need to be able to determine whether a class method was called or not. How can I do this with OCMock?


Solution

  • Starting with OCMock release 2.1 this is supported out of the box. You can now stub class methods in the same way as you stub instance methods.