@testable Import

July 6th, 2015

Filed under: Xcode | Be the first to comment!

A new feature added in Xcode 7 to simplify unit testing is the @testable import statement. Instead of making your application classes members of the unit testing target, which is what you had to do to unit test Swift code in Xcode 6, add the following statement to your unit testing classes: @testable import MyApp […]