Am just getting started with OCMock so bear with me - I have been looking through the documentation and loads of examples but am yet to find a definitive answer - is it possible to mock out an init call within a static method, for example:
+ (NSString *)addHeaderToRequest:(NSString *)request namespace:(NSString *)namespace
{
CTTeleInfo *netInfo = [[CTTeleInfo alloc] init];
CTCarrier *carrier = [netInfo subscriberCell;
NSString *mobileNetwork = [carrier carrierName];
if ( mobileNetwork == nil )
mobileNetwork = @"Unknown";
}
Is it possible to mock out the CTTeleInfo object without changing the code?