[rspec-users] stepping across features

James Byrne lists at ruby-forum.com
Fri Dec 5 14:52:06 EST 2008

Andrew Premdas wrote:
> Pretty hard for me to comment with so much stuff and so little context.
> However :)

My messages are quite long enough as it is I am afraid.

> about a work order to produce invoices. You have to do some design and
> thinking to produce good features. Challenge assumptions and try and see
> things from different view points. For example why can't I just do
> Given outstanding payments
> When I visit the make invoices page
> I should see a list of invoices I can create
> And then do some other little scenarios to create an invoice etc..

It always helps to have another point of view.  I am grappling with this 
issue mentally before committing myself to a line of approach.  This 
project is, as you surmise, a conversion of an existing body of work 
into a new form.  It is also anticipated that the existing application 
will be extended in many areas.  The scope of the project encompasses 
everything from General Ledger down to edi transmission of tax documents 
to the federal government.

I am trying to determine whether the way to control and document this 
project while focusing programming activity is best served by using BDD 
features or whether those objectives should be satisfied otherwise and 
BDD features only used for specific implementation issues. Part of my 
difficulty is my limited vocabulary for expressing this and part is my 
want of experience with this form of design and development.  My 
previous experience was with much less sophisticated tools than I am 
currently using and I am reluctant to turn a scalpel into a screwdriver 
out of ignorance on my part.  On the other hand, if a jack hammer is 
needed then a scalpel is not of much use.

So reworking my earlier effort:

Feature:  Bill chargeable work
  In Order To generate income
  A Billing Clerk
  Should be able to create invoices
  To Increase Revenue

  Scenario: Manual Invoice Release
    Given billable charges
    When I visit the create an invoice page
    Then I should see a list of all billable charges

  Scenario: Manual Invoice Release by Client
    Given billable charges
    When I visit the create an invoice page
      And I search for client "Y"
    Then I should see a list of all billable charges only for client "Y"

Is this getting closer to what my features should look like?

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list