I'm trying to add OCMock to my existing Cocoa project, but am running to a strange problem that I don't see anyone else cover.
I finally isolated it to the following: if I simply add OCMock.framework reference to my project (i.e. drag it in somehow into Link Binary With Libraries build phase), when I run tests, the real app gets launched instead.
Without OCMock, the output is normal:
Test Suite 'Multiple Selected Tests' started at 2013-02-07 20:07:03 +0000
With OCMock framework link (partial output):
Error loading MyProjTests.octest/Contents/MacOS/MyProjTests
Library not loaded: @rpath/OCMock.framework/Versions/A/OCMock
Reason: image not found
IDEBundleInjection.c: Error loading bundle '/Users/alex/Library/Developer/Xcode/DerivedData/MyProj-bqwyxyspdiudktfnjcdgibdmpgsa/Build/Products/Debug/MyProjTests.octest'
Other app output then appears as normal after this point. While the app is running, test progress is spinning on last tab of project navigator, and doesn't stop until you Quit the app. So test is supposedly in progress the whole time your app is running.
Clearing test host or bundle loader didn't solve, only produced linking errors for wrong architecture.
I'm using latest Xcode, 4.6. Any help greatly appreciated.