First up tonight, I follow the advice of an astute reader and probe a date boundary in a little more depth. In my browse-meals-by-month Cucumber scenario, I had only probed navigation between months, but failed to perform similar navigation across a year boundary.
To address this, I add a meal from 2003 to the scenario (in bold):
Scenario: Browsing a meal in a given monthRunning the scenario now, everything is passing:
Given a "Even Fried, They Won't Eat It" meal enjoyed in May 2009
And a "Salad. Mmmm." meal enjoyed in April 2009
And a "Almost French Onion Soup" meal enjoyed in September 2003
When I view the list of meals prepared in May of 2009
Then I should see the "Even Fried, They Won't Eat It" meal among the meals of this month
And I should not see the "Salad. Mmmm." meal among the meals of this month
And I should not see a link to June 2009
When I follow the link to the list of meals in April 2009
Then I should not see the "Even Fried, They Won't Eat It" meal among the meals of this month
And I should see the "Salad. Mmmm." meal among the meals of this month
And I should see a link to May 2009
And I should not see a link to February 2009
When I follow the link to the list of meals in September 2003
Then I should see the "Almost French Onion Soup" meal among the meals of this month
And I should see a link to April 2009
Nice! I didn't need to add any code, but now have assurance that it will work, even across year boundaries.
With that, I am considering that scenario complete.
Before moving onto the next scenario, I run all of the Cucumber scenarios to ensure that I haven't accidentally broken something and to see where I'm at. Where I am at is:
135 passed steps and only 4 step undefined am I really that close to being done? Sadly no.
I need to do a quick inventory of what is left before I am done:
- The home page
- CSS—everything is unstyled at this point
- Deploy CouchDB design documents
- Advanced search interface
- RSS Feeds
- Mailing lists
- Feedback forms
- Cookbook collection—a list of the cookbooks (linked to via our Amazon associates account) from which various recipes draw inspiration
That means more Cucumber scenarios. First up, RSS feeds...
I like to anthropomorphize all non-human actors. It helps me to conceptualize what really needs to be done. Nothing too fancy in the case of RSS consumers:
Feature: RSSAdditionally, I add a general site-wide feature description with 5 scenarios (individual step text not included for brevity's sake):
So that I tell my user when there are updates to this great cooking site
As an RSS bot
I want to be able to consume your RSS
Scenario: Meal RSS
Given 20 yummy meals
When I access the meal RSS feed
Then I should see the 10 most recent meals
And I should see the summary of each meal
Scenario: Recipe RSS
Given 20 delicious, easy to prepare recipes
When I access the recipe RSS feed
Then I should see the 10 most recent recipes
And I should see the summary of each recipe
So that I may explore many wonderful recipes and see the meals in which they were served
As someone interested in cooking
I want to be able to easily explore this awesome site
Scenario: Quickly scanning meals and recipes accessible from the home page
Scenario: Exploring food categories (e.g. Italian) from the homepage
Scenario: Give feedback to the authors of this fantastic site
Scenario: Give feedback to the authors on a yummy meal
Scenario: Give feedback to the authors on a delicious recipe
With that, I am up to 54 undefined Cucumber steps. That's somewhat deflating, but should serve as a fairly realistic estimate of the outstanding work remaining before I can deploy.
And I'll get started with the first of those 54 steps tomorrow.