2
In order to re-use scenario table values
3
As a citizen of Cucumbia
4
I want to explicitly mark the parameters in a scenario outline
6
Scenario Outline: controlling order
7
Given there are <start> cucumbers
8
When I eat <eat> cucumbers
9
Then I should have <left> cucumbers
12
| left | start | eat |
16
Scenario Outline: reusing place holder
17
Given there are <start> cucumbers
18
When I eat <eat> cucumbers
19
Then I should have <left> cucumbers
20
And I should have <eat> cucumbers in my belly
22
Examples: Lots of cukes
23
| start | eat | left |
27
Examples: Ridiculous amounts of cukes
28
| start | eat | left |
32
Scenario Outline: no placeholders
33
Given there are 12 cucumbers
34
When I eat 5 cucumbers
35
Then I should have 7 cucumbers
38
| start | eat | left |
42
Scenario Outline: using '<' and '>' not as placeholder
43
Given the belly space is < 12 and > 6
44
And there are <start> cucumbers
45
When I eat <eat> cucumbers
46
Then I should have <left> cucumbers
49
| start | eat | left |
53
Scenario Outline: with step tables
54
Given I have the following fruits in my pantry
60
When I eat <number> <fruits> from the pantry
61
Then I should have <left> <fruits> in the pantry
64
| number | fruits | left |
66
| 4 | strawberrys| 1 |
69
Scenario Outline: placeholder in a multiline string
70
Given my shopping list
72
Must buy some <fruits>
74
Then my shopping list should equal
76
Must buy some cucumbers
83
Scenario Outline: placeholder in step table
84
Given I have the following fruits in my pantry
86
| cucumbers | <quant_cukes> |
87
| strawberrys | <quant_straw> |
89
When I eat <number> <fruits> from the pantry
90
Then I should have <left> <fruits> in the pantry
93
| quant_cukes | quant_straw | number | fruits | left |
94
| 10 | 5 | 2 | cucumbers | 8 |
95
| 5 | 5 | 4 | strawberrys | 1 |