erikdoe/ocmock — pull request #116 by carllindberg (2014-07-16 02:24:33+00:00)
Title: Tweaks to allow running on MacOS X 10.8

I have not been able to run any of the OCMock3 test cases on MacOS X 10.8 (Mountain Lion). I get infinite recursion in a few places, so the tests crash out. I believe this is the issue in #107. I can run in the IOS7 simulator, but not the OSX side. Being XCTest, we can no longer test on iOS6 so I don't know if that also has an older runtime which OCMock has issues with.

After a few stabs, I think I came up with some simple tweaks which allow things to work for me again.

The first one is using [NSObject class] directly avoids the chance we are using a class which has had all its methods mocked out when obtaining the objc_msgForward function, which seemed to be an issue. Without that, the runtime seems to call a mocked-out method repeatedly. Also added "isBlock" to the white lists, since some internal calls to that would also infinitely recurse. With these changes, all the tests pass cleanly when running on 10.8, which none of the OCMock3 versions had for me.