Showing posts with label ocmock. Show all posts
Showing posts with label ocmock. Show all posts

Sunday, April 22, 2012

How to stub a class method in OCMock?


I often find in my iPhone Objective-C unit tests that I want stub out a class method, e.g. NSUrlConnection's +sendSynchronousRequest:returningResponse:error: method.