I met a great analogy the other day - applies to TDD as well as BDD really.

Unit testing is like double-entry book-keeping.

It takes longer to do the initial work, and yes you have some
repetition - but the reduction in errors saves you time and money
overall.

I'm struggling to think of a project that is so short that it needs no
testing.  Anything that you have to run more than once, or that you
might conceivably have to change one day (especially as that change
will probably be done by a different set of developers to the original
code!) is going to benefit from testing.

Ask your employer, "so, would your accountants skip double-entry
bookkeeping on really small expenses?"  :)

I could see the temptation on a pure prototype mock-up project - but
you'd have to make damn sure that the technical debt of *not* having
tests was clear and up-front, as far too many prototype mock-up
systems get turned into real production systems, in which case you'd
be spending more effort retro-fitting tests to the prototype to get it
production-ready.  And in my experience, it's much harder to add
testing to existing code than to write the tests as you go.

- Korny

On Tue, Jul 8, 2008 at 4:25 AM, yitzhakbg <[EMAIL PROTECTED]> wrote:
>
> This might be a loaded question on this forum, but here goes:
> Just had a discussion with a prospective employer, a Ruby On Rails shop. His
> reaction to BDD development on every project was skeptical, saying something
> like: "It depends on the project". "Some jobs are so short that the extra
> time invested in developing tests doesn't justify the cost".
> He was insistent that writing tests costs more. After all, you write twice:
> first the tests, then the code (or the other way 'round).
> My question is: From hard, practical, cold real world experience, is that
> so? Is BDD development more expensive? Let me qualify that. One could
> answer, "no, since the tests save you pain and heartache down the line". The
> question is whether BDD coding with RSpec is more expensive in the
> implementation phase and how much truth there is in the statement that BDD
> isn't for every project, like quick knock ups for example?
> --
> View this message in context: 
> http://www.nabble.com/Is-BDD-with-RSpec-cheaper--tp18323328p18323328.html
> Sent from the rspec-users mailing list archive at Nabble.com.
>
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Kornelis Sietsma korny at my surname dot com
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to