Passing primitives to an OCMock’s stub
It’s been awhile since this question has been asked but I ran into this issue myself and couldn’t find a solution anywhere. OCMock now supports ignoringNonObjectArgs so an example of an expect would be [[[mockObject expect] ignoringNonObjectArgs] someMethodWithPrimitiveArgument:5]; the 5 doesn’t actually do anything, just a filler value