I am trying to use OCMock for the first time in my test cases. This is a Mac project built on Lion and aimed at it in Xcode 4.3. In the main application and the test suite, both ARCs are turned on, and so every time I run the tests, I see the following log message:
GC: forcing GC OFF because OBJC_DISABLE_GC is set
This is great, since I use ARC, so I'm not interested in GC. When I build my unit tests related to the latest stable version of OCMock (2.0.1), the assembly has no problems. At runtime, after the above log statement, I get the following:
The test bundle at /Users/___/Library/Developer/Xcode/DerivedData/___-ayizwpehemunvodsdvczckkvarsh/Build/Products/Debug/___Tests.octest could not be loaded because its Objective-C runtime information does not match the runtime information required by the test rig. This is likely because the test rig is being run with Objective-C garbage collection disabled, but the test bundle requires Objective-C garbage collection. To enable Objective-C garbage collection for the test rig, run it in an environment without the OBJC_DISABLE_GC environment variable.
2012-03-06 10:29:32.812 otest[8486:203] *** NSTask: Task create for path '/Users/___/Library/Developer/Xcode/DerivedData/___-ayizwpehemunvodsdvczckkvarsh/Build/Products/Debug/___Tests.octest/Contents/MacOS/___Tests' failed: 22, "Invalid argument". Terminating temporary process.
, , , , GC. , ? , - , , , .
.
- ARC
Test Host unit test- OCMock
- , .
, ARC , clang mach-o, . OCMock, . , -, .