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.
<
If you modify your method under test to take a parameter which injects the class of the NSURLConnection, then it's relatively easy to pass in a mock that responds to the given selector (you may have to create a dummy class in your test module which has the selector as an instance method and mock that class). Without this injection, you're using a class method, essentially using NSURLConnection (the class) as a singleton and hence have fallen into the anti-pattern of using singleton objects and the testability of your code has suffered.