Mocking in Swift is surprisingly hard. I wrote the following article that explains three different ways of approaching the subject: To Kill a Mocking Bird.

I also made an Xcode playground that allows you to play around with mocking strategies. You can download it here.

Enjoy!