[rspec-users] Working outside-in with Cucumber and RSpec

Ashley Moran ashley.moran at patchspace.co.uk
Thu Oct 30 10:34:07 EDT 2008

On 30 Oct 2008, at 13:46, David Chelimsky wrote:

> 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.

Hmm, I just tried to map the benefit you get from specs in three key  

(read as <column header> <value> <row header> eg
  Specs very helpful for Good Design)

                        Specs            |      No specs
Good Design         very helpful for         discourages
Documentation        somewhat help[1]       no effect on[2]
Regression Testing  marginally help[3]      no effect on[2]

[1] but Cucumber is better?
[2] given Cucumber features and simple controllers
[3] they don't detect most real breakages

Just my opinion of course.  But makes me think that David is right to  
ask "Is it true we should write controller specs cuz they highlight  
excess complexity?"  I personally think that's the only way they  
provide real value, given they are at the surface of the app and  
therefore hit directly by Cucumber.

But then, the longer I do BDD, the smaller my all classes have become,  
and the more the value of unit specs have shifted from regression  
testing to design.  (I'm starting to think I need more RSpec mini- 
integration examples, rather than doing everything on a class-by-class  
basis.)  So maybe the conclusion above is not controller-specific at  



More information about the rspec-users mailing list