[rspec-users] RSpec usage
work at ashleymoran.me.uk
Mon Feb 19 06:23:54 EST 2007
On 17 Feb 2007, at 20:27, David Chelimsky wrote:
> I'd like to add to this question.
> Based on experience doing apps using test/unit and rspec, what
> benefits do you perceive of each approach during initial development
> and during subsequent maintenance?
Can't really say about maintenance because we've only got one app
finished and it hasn't needed going back to. (Well, we've got two
finished, but I wasn't involved on the first one and there are no
As for initial development:
- you can focus on implementing specific features, rather than trying
to remember what other bits of code might be affected by any given
change (which I find very tiring, as I'm a cautious programmer by
nature, rather than a change-it-and-see type)
- you can code at a more consistent rate because you're working on
discrete pieces of functionality, so breakages tend to be localised
and easily identifiable (it's probably not the most flattering way to
describe it, but I told my boss that programming with rspec was like
digging a hole - put shovel in ground, throw soil over shoulder, repeat)
- I'm only working with one other person on our current project, but
when I read his code I get a good idea what he was thinking by
looking at the specs
- it's far less stressful
- I get this wierd feeling of creativity writing the specs first,
like I want the code to do *this* and *this* and why not *this* too.
It feels like half the battle is over just by figuring out what I
want the code to look like.
There is one downside, which is that on the rare occasions my office
is quiet enough to do any useful work (generally around the time hell
places an order for hats and scarves, the moon changes a nice shade
of #0000ff, and local porcine aviation increases noticeably), it's
possible to code so fast I'm exhausted by the end of the day.
Fortunately, the phone stops this happening too often. And on the
other hand, it beats chasing a typo around for most the afternoon
slowly losing the will to live.
More information about the rspec-users