[rspec-users] Working outside-in with Cucumber and RSpec
dchelimsky at gmail.com
Thu Oct 30 09:46:49 EDT 2008
On Thu, Oct 30, 2008 at 5:20 AM, Matt Wynne <matt at mattwynne.net> wrote:
> On 27 Oct 2008, at 16:35, Pat Maddox wrote:
>> Matt Wynne <matt at mattwynne.net> writes:
>>> Pat - are you going solo too?
>> Nope, I'm trying to teach RSpec/BDD to an organization that currently
>> doesn't use it and has 0% test coverage. It's interesting, to say the
>> least. They're good devs, but even so, the effects of not writing tests
>> first (or even at all) are painfully evident when trying to get the
>> codebase under test, and especially to change stuff. Really puts your
>> "working effectively with legacy code" chops to work :)
> This reminds me of an argument I was going to make for consistently writing
> specs as you go, even for apparently very simple controllers. As the
> controller gets more and more complex, it's hard to know when you've crossed
> the line into something that needs specs, and when you realise it, it's
> usually too late.
I'd agree with this (in spite of my previous comments), and add to it.
One of the benefits of writing examples is that they actually help to
expose things that are growing complex. If it's hard to test, it's
probably hard to change.
Aslak made a good point earlier this thread with "don't write specs
just cuz," but perhaps this fact is sufficient "cuz" to motivate.
> That's why I'm happy in the TDD habit.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users