After an intense day at my day job, my chain is somewhat light tonight. Rather than make the ultimate call on the framework that I will use or the hosting service, I add a Rails Recipe story.
I am not sure how I feel about these stories. First off, they do not detail the behavior of the system, rather characteristics of the system. Even so, they are important characteristics of EEE Cooks that we have cultivated over the years and need to remain in place when we transition back to a document based store.
Feature: Recipe Details
So that I can accurately reproduce a recipe at home
As a web user
I want to be able to easily recognize important details
Scenario: Viewing a recipe with several ingredients
Given a recipe for Buttermilk Chocolate Chip Pancakes
When I view the recipe
Then I should see an ingredient of "1 cup of all-purpose, unbleached flour"
And I should see an ingredient of "¼ teaspoons salt"
And I should see an ingredient of "chocolate chips (Nestle Tollhouse)"
Scenario: Viewing a recipe with non-active prep time
Given a recipe for Crockpot Lentil Andouille Soup
When I view the recipe
Then I should see 15 minutes of prep time
And I should see that it requires 5 hours of non-active cook time
Scenario: Viewing a list of tools used to prepare the recipe
Given a recipe for Chicken Noodle Soup
When I view the recipe
Then I should see that it requires a bowl, a colander, a cutting board, a pot and a skimmer to prepare
Scenario: Main site categories
Given a recipe for Mango and Tomato Salad
And site-wide categories of Italian, Asian, Latin, Breakfast, Chicken, Fish, Meat, Salad, and Vegetarian
When I view the recipe
Then the Salad and Vegetarian categories should be active
In addition to the lack of comfort with the intrinsic nature of the stories, I am also bothered by the Given steps. They do not accurately describe the preconditions needed to reproduce the Then statements. Ultimately, that is a function of my abusing scenarios to describe characteristics, so I am willing to live with it.
Ultimately, these are not so much stories as characteristics of a legacy system that must be preserved. I am OK with abusing Cucumber—at least until the transition is made.
No comments:
Post a Comment