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

How can I use OCMock to verify that a method is never called?

Since r69 of OCMock, it’s possible to reject a method call http://svn.mulle-kybernetik.com/OCMock/trunk/Source/Changes.txt Nice mocks / failing fast When a method is called on a mock object that has not been set up with either expect or stub the mock object will raise an exception. This fail-fast mode can be turned off by creating a “nice” … Read more

How to stub a class method in OCMock?

Update for OCMock 3 OCMock has modernized its syntax for supporting class method stubbing: id classMock = OCMClassMock([SomeClass class]); OCMStub(ClassMethod([classMock aMethod])).andReturn(aValue); Update OCMock now supports class method stubbing out of the box. The OP’s code should now work as posted. If there is an instance method with the same name as the class method, the … Read more

Test target X encountered an error (Early unexpected exit, operation never finished bootstrapping – no restart will be attempted

I have my notes and demo applications for both Cocoapods and Carthage here https://github.com/onmyway133/TestTarget Make sure all frameworks are linked to the Test targets Configure Runpath Search Paths to point to $(FRAMEWORK_SEARCH_PATHS) More info Run-Path Dependent Libraries

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)