[rspec-users] When to use BDD/TDD w/ external libraries

aslak hellesoy aslak.hellesoy at gmail.com
Fri Jun 8 05:13:03 EDT 2007


On 6/8/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
>
> Test First Development is great...But should you use it when you are
> adding classes/methods on to external library that doesn't have an
> extensive test suite?  I noticed that the rspec plugin for autotest
> has no specs.
>
> David Chemlinsky said something to the list a while back that has
> been stewing in my subconscious - that you develop software
> differently using Test First Development/BDD.  I noticed that it

David (Chelimsky is his last name) and Ryan Davis paired on the RSpec
plugin for Autotest at Railsconf, and I suspect that "they didn't have
time" to write specs for it ;-)

Look at the number of bugs that have been reported (and fixed) against
RSpec's Autotest plugin in the previous weeks.

Maybe there is a relationship between the number of bugs and the lack
of specs? ;-)

> would be very hard to add a spec library to autotest (I once
> performed some code coverage on it and I believe it was at something
> like 30 or 40 percent.).  So if one wanted to develop something like
> the rspec plugin to autotest, would it be wise to develop it test first?
>

Any code that doesn't have automated tests works by accident as far as
I'm concerned.
It makes no difference whether the code is using a third party library
or code whether it's part of your own code.

However, some third party libraries (like J2EE) makes it so hard to
test any code using it that you essentially have to choose between the
third party or the ability to test. Sometimes having both is too much
work.

Aslak

> I'm not sure if anyone else has had this difficulty, or if I'm being
> clear.  Let me know if I should clarify with some examples.
>
> Best,
>
> Scott
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list