[rspec-users] [Cucumber, BDD] When not to use Cucumber?

Ben Mabey ben at benmabey.com
Sat Jan 24 12:57:39 EST 2009

On 1/24/09 5:02 AM, voodoorai2000 wrote:
> In conclusion, when not to use cucumber? never.  Always use cucumber,
> everyone always use cucumber, lets find this hard problems to re-use steps
> and tackle them together, find a solution and move on to the next
> road-blocker.  Use Rspec but as the underlying language to make cucumber
> work, not to divide your application into model view controller specs,
> separate your tests into user and developer features/steps.
> Distributed testing is a must to use cucumber effectively, and the use of
> mocks is also unrefutable[1], but only as an alternative to an inability to
> test something in a classical way[2]
> Rai
> [1]http://rubyconf2008.confreaks.com/testing-heresies.html
> [2]http://martinfowler.com/articles/mocksArentStubs.html

Well, I have learned never to say never. ;)  As far as the mocking 
goes...  I always use real objects in features unless I need to make an 
external network call to another system (i.e. a web services call, in 
which case I like to use fakeweb[1]).  That said, one of the things I 
really like about having features is that it allows me to use mock 
objects in my object level examples without any fear of integration 
point failures.  I find it very hard to test objects under total 
isolation without using mocks to remove dependencies and I gain a lot of 
design benefit from using mocks.  I really don't want to get into the 
whole classic vs mockist debate though as it was just beat to death on 
the TDD mailing list.[2] :)


[1] http://github.com/chrisk/fakeweb/tree/master
[2] http://tech.groups.yahoo.com/group/testdrivendevelopment/message/29674

More information about the rspec-users mailing list