Testing
I was scratching my head trying to figure out how to unit test NSURLConnection when the Google God gave me this explanation from Mitchell Hashimoto.
Since the operation under test is asynchronous, the test would exit before the the NSURLConnection completed. The key is to let an NSRunLoop, well, run until your asynchronous operation is [...]
Marc Clifton:
“This is why many people balk at the idea of writing the unit test first–it places them in the uncomfortable position of having to do up front design work without consciously recognizing that this what they are doing.”
© Kupuk. Powered by WordPress using the DePo Skinny Theme.