News for hackers. Stuff that matters.

willemderu

Re:Ask YC: Does anybody enjoy unit testing their code? on Thursday June 12, 2008 @07:24AM (#215835)
I have been using Behavior driven development (BDD): http://en.wikipedia.org/wiki/Behavior_driven_development This has made unit testing more intuitive (and fun) for me. Specifically, I have been using RSpec, http://rspec.info/ , which is an excellent BDD framework for Ruby. I am not a purist who first writes the tests(behavior's) before writing the actual code. However, my experience has been that it is important to eventually have thorough unit tests for your code to ensure that your application is more robust. It allows you to add new features with greater confidence.