Page 1 of 1

[SUGGESTION] Modern sytle about `ignoringNonObjectArgs`

PostPosted: 17 Mar 2016, 12:16
by oldman
In doc (, if I want to ignore all non-object arguments in a invocation, I can write the code as fellows.

Code: Select all
[[[mock stub] ignoringNonObjectArgs] someMethodWithIntArgument:0].andReturn(xxx);

It will work. But the style is Mock 2, not Mock 3. so I suggest to write code like this.

Code: Select all
OCMStub([mock someMethodWithIntArgument:0]).ignoringNonObjectArgs.andReturn(xxx);

it has the same meaning with the other

So, this is my suggestion. Am I right? or do I miss something? Just fill free to tell me, thank U!