One of the many new features with Xcode 7 and Swift 2 is the @testable attribute. While we have been able to do unit testing in previous versions of Xcode and Swift the big drawback has always been that any routine we wanted to test had to have an access level of public. This was a pretty big drawback especially with frameworks where we need to test routines without making them public. This has changed in Xcode 7 and Swift 2. In this post we will demonstrate how to use the new @testable attribute in our test source code to make all public and internal routines usable by our test code but not usable by other frameworks and app targets.
the post can be found here: http://masteringswift.blogspot.com/2015/07/swift-2-and-unit-testing.html