I'm using Kiwi for tests and when I try to stub the class method [GAI sharedInstance]
, it doesn't work. Here is what I'm doing:
NSObject *gaiMock = [KWMock nullMock];
[GAI stub:@selector(sharedInstance) andReturn:gaiMock];
When I break after these lines of code and compare them in the console, here is what I get:
(lldb) po [GAI sharedInstance]
<GAI: 0x10c42d940>
(lldb) po gaiMock
<KWMock: 0x112926600>
What am I doing wrong?