Monthly Archives: October 2014

BASH script to create a git bare repo


I can’t count how many times I’ve created a project in my IDE then dropped to the terminal to create a bare git repository, then add that as a remote to my project. And also add/commit/push. So, I decided to make my life a bit easier by writing a small shell script to do all […]

Posted in Uncategorized | Tagged , , , | Leave a comment

Unit testing async network calls in Swift

Swift Language

Asynchronous unit testing in Swift You have probably written code with a NSURLSessionDataTask that notifies a delegate when the data is received. How do you write a unit test for that? Introduction The Test Summary Resources Introduction Let’s stub out some typical code. Here a an API function that takes perhaps a REST endpoint and […]

Posted in iOS, Swift | Tagged , , | Leave a comment