specta / expecta

A Matcher Framework for Objective-C/Cocoa
MIT License
1.59k stars 158 forks source link

Create separate framework test targets #140

Closed erichoracek closed 9 years ago

erichoracek commented 9 years ago

When you attempt to build the Expecta-iOS framework scheme via the following command with the iOS 7.1 Simulator installed:

xcodebuild build -scheme 'Expecta-iOS'

You'll receive the following error:

xcodebuild: error: Failed to build project Expecta with scheme Expecta-iOS.
    Reason: The run destination iPad 2 is not valid for Running the scheme 'Expecta-iOS'.

This is due to the fact that the Expecta-iOS framework scheme is currently configured to run tests using the Expecta-iOSTests target. However, this is an incorrect configuration, as the Expecta-iOSTests target does not actually depend on the framework target, but rather depends on the static library target. As such, running the Expecta-iOSTests target will not actually test the framework target. To fix this, I've:

orta commented 9 years ago

looks like Tests/Support/objc-build-scripts/cibuild needs to be updated too 👍

erichoracek commented 9 years ago

@orta doesn't look like that file needed to be modified, but we did need to add the framework to the test target's runpath search paths and copy it in. Should be good now though!

robb commented 9 years ago

Looks good to me, to @orta too?

orta commented 9 years ago

Yep

Giphy