Perhaps.  But I'm not sure then what the difference is between requirements
that should (no pun intended) be expressed via RSpec examples versus
features.  Lots of features use the word "should" in their then clauses.
 Take this example from the 'Feature Introduction' of the cucumber wiki:

Scenario: Buy last coffee
    Given there are 1 coffees left in the machine
    And I have deposited 1$
    When I press the coffee button
    Then I should be served a coffee


Should this be an rspec example instead?  It certainly could be, but I don't
think an rspec example would communicate as well with the customer as the
feature would.  And that's the primary goal here (as Pat and Matt have
reminded me!).  Which is not to say that the developers wouldn't get benefit
out of a spec example as well -- you could do both -- just that at least in
this case a feature is clearer to the customer than a spec example.

Steve

On Wed, Jan 7, 2009 at 4:22 PM, Stephen Eley <sfe...@gmail.com> wrote:

> On Wed, Jan 7, 2009 at 12:23 PM, Steve Molitor <stevemoli...@gmail.com>
> wrote:
> > By a global requirement I'm talking about requirements like 'all emails
> must
> > be formatted like this...'  Some people call them constraints, but I'm
> > focusing on UI or business rules, not technical things.
>
> You say "must."  That's a programmer's synonym for "should."  And to
> me that feels like a level of detail better handled with RSpec
> examples, where "should" is central to the domain language, than
> Cucumber features (which are more about stimulus and response).  I
> know you said "business rules" and that tends to imply Cucumber in a
> lot of minds, but a SpecDoc formatted output that lists all the "it
> should" text works pretty well for business process description too.
>
>
> --
> Have Fun,
>   Steve Eley (sfe...@gmail.com)
>   ESCAPE POD - The Science Fiction Podcast Magazine
>   http://www.escapepod.org
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to