In the following steps, we will explore creating some testable stories with Lettuce, and wiring them to runnable Python code:
- Create a new folder called recipe32 to contain all the files in this recipe.
- Create a file named recipe32.feature to capture our story. Write the top-level description of our new feature, based on our shopping cart:
Feature: Shopping cart As a shopper I want to load up items in my cart So that I can check out and pay for them
- Let's first create a scenario that captures the behavior of the cart when it's empty:
Scenario: Empty cart Given an empty cart Then looking up the fifth item causes an error And looking up a negative price causes an error And the price with no taxes is $0.00 And the price ...