From: David Chelimsky Date: 2007-01-24T08:08:31+09:00 Subject: Re: I don't get rspec On 1/23/07, Jim Weirich wrote: > Wayne Vucenic wrote: > > I don't look at this as "add a test to the spec/add a trivial fix to > > the code" but instead as "add a test to the spec/do the simplest thing > > that could possibly work to get the tests to pass", and I find > > substantial value in this approach. > > When I do TDD, I approach it with a Jeckle and Hyde perspective. When I > write a test, I am writing a specification of how the code should work. > > When I start writing code, I become the laziest programmer you can > imagine, writing only enough code to pass the specification as it is > written at that moment. If it is not called out in the spec, it doesn't > get written. > > When I switch back to test writing, I cuss out that lazy programmer > (i.e. me just a few moments ago) and write additional specs to force the > code to do exactly what I want. > > The tension between Dr. Jeckle (the spec writer), and Mr. Hyde (the > programmer) causes Dr. Jeckle to write better specs and Mr. Hyde to > write lean, correct code. With me it's more like Abbott and Costello! Seriously, thanks for describing this so well. Cheers, David > > -- > -- Jim Weirich > > -- > Posted via http://www.ruby-forum.com/. > >