]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/examples/stories/addition
58f0929900fa830e79478cb8f89df458e2c1b4b3
[rails.git] / vendor / gems / rspec-1.1.2 / examples / stories / addition
1 This is a story about a calculator. The text up here above the Story: declaration
2 won't be processed, so you can write whatever you wish!
3
4 Story: simple addition
5
6   As an accountant
7   I want to add numbers
8   So that I can count beans
9
10   Scenario: add one plus one
11     Given an addend of 1
12     And an addend of 1
13     
14     When the addends are addeds
15     
16     Then the sum should be 3
17     And the corks should be popped
18   
19   Scenario: add two plus five
20     Given an addend of 2
21     And an addend of 5
22     
23     When the addends are added
24     
25     Then the sum should be 7
26     Then it should snow
27     
28   Scenario: add three more
29     GivenScenario add two plus five
30     And an addend of 3
31     
32     When the addends are added
33     
34     Then the sum should be 10