Archive

Archive for August, 2009

Only running unit tests in Xcode if the build was successful

August 14th, 2009 2 comments

My workflow in Xcode is typical TDD – write a test, run the tests, write some code, run the tests…  I set up a “Run Script” build phase, so that every time I build the tests, they are automatically run.  The only problem is that the “Run Script” happens whether the build was successful or not.  So, I try to build and fail, and then the same exact tests that I already ran, automatically run again – while I sit there and wait.

The solution turned out to be very simple.  “Run Script” build phases in Xcode can have input files and output files.  The phase is only run if some input files were more recently modified than some output files.  Thus, if we set the input file to be the test executable, and the output files to be all the source files, then the tests will only run if the build is successful.  It will look something like this when set up:

Conditional Run Script Phase

Staying humble

August 10th, 2009 No comments

I’m sitting here reading Dave Astels’ awesome beta book The RSpec Book and I’m so impressed by the revolutionary (to me) idea to “write the code you wish you had.”  About 10 minutes later, I stumble upon a video from a class that’s been taught at MIT since 1981, in which they talk about programming by “wishful thinking.”  Yeah… the same exact concept… 28 years ago…

Categories: Programming Tags:

windows 7 product key

windows 7 product key

windows 7 key generator

windows 7 key generator

free winrar download

free winrar download

winzip activation code

winzip activation code

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

winrar download free

winrar download free

winzip free download full version

winzip free download full version

windows 7 activation crack

windows7 activation crack

windows 7 crack

windows 7 crack

free winzip

free winzip
\n