Natasha The Robot published nice articles about Unit Testing in Swift, that explains how to implement dependency injection and introduces Quick testing framework.
Unit Testing in Swift: A Quick Look at Quick
Unit Testing in Swift: Dependency Injection