Created
October 27, 2010 06:33
-
-
Save gregturn/648564 to your computer and use it in GitHub Desktop.
PyCukes BDD story
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Story: Shopping cart | |
As a shopper | |
I want to load up items in my cart | |
So that I can check out and pay for them | |
Scenario 1: 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 with taxes is $0.00 | |
Scenario 2: Cart getting loaded with multiple of the same | |
Given an empty cart | |
When I add a carton of milk for $2.50 | |
And I add another carton of milk for $2.50 | |
Then the first item is a carton of milk | |
And the price is $5.00 | |
And the cart has 2 items | |
And the total cost with 10% taxes is $5.50 | |
Scenario 3: Cart getting loaded with different items | |
Given an empty cart | |
When I add a carton of milk | |
And I add a frozen pizza | |
Then the first item is a carton of milk | |
And the second item is a frozen pizza | |
And the first price is $2.50 | |
And the second price is $3.00 | |
And the total cost with no taxes is $5.50 | |
And the total cost with 10% taes is $6.05 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment