[rspec-users] Mocks? Really?
Rick DeNatale
rick.denatale at gmail.com
Mon Dec 31 12:53:21 EST 2007
On Dec 30, 2007 10:09 PM, Francis Hwang <sera at fhwang.net> wrote:
> On Dec 30, 2007, at 9:38 PM, Jay Levitt wrote:
>
> >>> Incidentally, how well-tested was that code base? 200 lines of copy-
> >> and-paste smells like untested code to me.
> >
> > 15-20 years ago, unit tests were not a widespread industry practice :)
> > This code's in a procedural language that really, really doesn't do
> > unit tests well. I've been trying, too. Almost wrote a pre-
> > processor,
> > till I thought about the maintenance nightmare that'd cause.
>
> Right, that's why I ask. I think working with languages, tools, and
> frameworks that are easier to test is a great advantage to how we all
> worked 10 or more years ago ... I suspect part of that luxury
> translates in being able to actually design _less_, since the cost of
> fixing our design mistakes in the future goes down significantly.
I don't think of it as designing less. (B/T)DD means designing
incrementally. I read recently something where someone made a
distinction between invention and discovery. Rather than sitting down
'ahead of time' and inventing a design, you can discover the design as
you go.
The tests/specs become the design documentation themselves, and can
evolve as requirements change or are refined as the process continues.
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
More information about the rspec-users
mailing list