0

I have a class method with a completion block being called in the method under test. So I want to stub this method and call

[[[mock stub] loadImageForRelativeFilePath:[OCMArg any] completionBlock:[OCMArg any]] andDo:^(NSInvocation *invocation)

but I am getting compilation error that no instance method for selector.

Any alternative or any issue with way of access ?

trungduc
  • 11,926
  • 4
  • 31
  • 55
  • Possible duplicate of [How to stub a class method in OCMock?](https://stackoverflow.com/questions/1810053/how-to-stub-a-class-method-in-ocmock) – pfandrade Apr 19 '18 at 09:34
  • Where is the method loadImageForRelativeFilePath:completionBlock: declared? Is the header file which declares the method definitely included by the test in which you try to stub it? Are you sure the name isn't misspelled? – Erik Doernenburg Apr 19 '18 at 21:09

0 Answers0