Reputation: 206
How do I mock a custom c-lib function using ocmock? Couldn't find anything on google, and any method stubbing functions from OCMock doesn't work
Upvotes: 2
Views: 2108
Reputation: 1680
One solution could be to encapsulate that functions inside an static class and mock it. In this way you can test the functions itself and mock his usage (using the static class).
Upvotes: 2
Reputation: 18922
You cannot mock C functions with OCMock. You will need to use another framework.
Upvotes: 1