[rspec-users] Spec'ing via features

Pat Maddox pergesu at gmail.com
Mon Nov 24 22:19:31 EST 2008

Pau Cor <lists at ruby-forum.com> writes:

> Pat Maddox wrote:
>> Here's my latest Theory of Testing, in a nutshell:
> I really understand what you are getting at. However, as I less 
> experienced developer (my degree is actually in business) I have found 
> that having more unit tests (for models and controllers) helps ensure 
> that I write better code. I can't think of a single case in which the 
> code I write where every public method is tested is not better than the 
> code I write where I don't do that.
> Am I unique in this? Or is strict TDD for every public method a good 
> practice for someone who is still learning how to design code well?

No, I don't think you're unique in that.  And yes, I think it's good
practice.  In my opinion, you have to extensively practice disciplined
TDD before you get a feel for when you can ease up.  This is also why
I'm more strict with my own code when I'm working with newer people
(although the ideal situation would be pairing!)


More information about the rspec-users mailing list