[rspec-users] [BDD] View specs and cucumber -- duplication of effort?

nruth nick.rutherford at gmail.com
Thu Oct 29 12:05:03 EDT 2009

Steve, I'm trying to persuade myself, or rather be persuaded by
someone who knows better.

Since writing this I got an update of the RSpec book and noted that
chapter 23 has been rewritten to discuss this. That's great, as the
version I had really didn't cover it at all. Thumbs up to David et al
for writing on it.

Also thanks all for the replies, they to some extent reinforce what I
was thinking myself, about complexity of said views, but also a lot of
new insight too!

On Oct 29, 3:09 pm, Stephen Eley <sfe... at gmail.com> wrote:
> On Thu, Oct 29, 2009 at 10:19 AM, David Chelimsky <dchelim... at gmail.com> wrote:
> > Everything in between falls along a spectrum, and it's up to you to find the
> > sweet spot, which _will_ vary from team to team, project to project, and
> > even view to view.
> Here's a discussion on another forum in which nearly the exact same
> question was asked:http://stackoverflow.com/questions/1563007/
> An excerpt from my answer:
> * * * * *
> As a heuristic, I'd suggest that you should _strongly_ consider
> writing a unit test any time any of the following questions can be
> answered "Yes":
> * Is the code I'm writing more than trivially complicated?
> * Does this code exist primarily to give answers to other code?
> * Is this existing code that I'm refactoring (that doesn't already
> have a unit test)?
> * Have I found a bug in this code? (If so, write a unit test before
> fixing it so it never sneaks in again.)
> * Do I have to think for more than ten seconds about the most elegant
> way to implement this code?
> * Is my Spidey Sense tingling?
> If none of the above is true, then _maybe_ you can get away with just
> doing integration testing. Again, there are a lot of cases where
> that's reasonable. But if you do run into problems later, be prepared
> to pay the price -- and that price should include writing unit tests
> at any moment if they seem called for.
> * * * * *
> --
> Have Fun,
>    Steve Eley (sfe... at gmail.com)
>    ESCAPE POD - The Science Fiction Podcast Magazine
>    http://www.escapepod.org
> _______________________________________________
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list