[SUGGESTION] Modern sytle about `ignoringNonObjectArgs`

Discussion of the OCMock framework. If you have patches we would prefer you to send them to the mailing list, but attaching them to a topic is possible, too.

[SUGGESTION] Modern sytle about `ignoringNonObjectArgs`

Postby oldman » 17 Mar 2016, 12:16

In doc (http://ocmock.org/reference/#argument-constraints), 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!
Posts: 1
Joined: 17 Mar 2016, 12:04

Return to OCMock