[rspec-users] Separation of duties Cucumber and Rspec ... RE: Noob question

Rick DeNatale rick.denatale at gmail.com
Thu Apr 30 06:32:48 EDT 2009


On Wed, Apr 29, 2009 at 5:47 PM, Colfer, Brian <bcolfer at shopping.com> wrote:
> Cucumber is not built to do rapid BDD ... It is an integration and acceptance specification exercise system.   Rspec is for development  ... Mocks are an integral part of the BDD process.  The idea is to partition the system component behaviors so that you can focuss on the implementing the behavior that you are working on.  This minimizes the "Yak Shaving " http://en.wiktionary.org/wiki/yak_shaving

While many might see Cucumber as a an "integration and acceptance
specification exercise system," and it certainly is a great tool for
expressing executable acceptance tests, it's actually also quite
powerful in doing rapid BDD.  The term "outside-in" development is
gaining popularity for a process which uses Cucumber (or a similar
tool I guess) and RSpec (or similar) together to do iterative
development using two nested iteration cycles.   The process goes
something like:

   1. Pick a story
   2. Write a failing cucumber scenario for the story.
   3. If, as is likely to happen the scenario exposes the need for new
classes, or new class behavior then:
   4. Use RSpec to design/code the new class(es) and behaviours
writing failing examples, then making them work.
   5. When the scenario succeeds, consider whether refactoring (in the
context of the overall system) is desirable in order to manage
technical debt.
   6. Repeat from 1

Using cucumber scenarios to keep you on the track of doing the next
thing that NEEDS to be done is a very good way to stave off the desire
to shave yaks.

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale


More information about the rspec-users mailing list