forked from cucumber/cucumber-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpand.feature
60 lines (48 loc) · 1.71 KB
/
expand.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Feature: --expand option
In order to make it easier to writhe certain editor plugins
and also for some people to understand scenarios, Cucumber
should expand examples in outlines.
Background:
Given a standard Cucumber project directory structure
And a file named "features/expand_me.feature" with:
"""
Feature: submit guess
Background:
Given the players' names:
| maker | breaker |
| Moriarty | Holmes |
Scenario Outline: submit guess
Given the secret code is <code>
When I guess <guess>
Then the mark should be <mark>
Examples: all colors correct
| code | guess | mark |
| r g y c | r g y c | bbbb |
| r g y c | r g c y | bbww |
"""
Scenario: Expand the outline
When I run cucumber -i -q --expand features/expand_me.feature
Then STDERR should be empty
And it should pass with
"""
Feature: submit guess
Background:
Given the players' names:
| maker | breaker |
| Moriarty | Holmes |
Scenario Outline: submit guess
Given the secret code is <code>
When I guess <guess>
Then the mark should be <mark>
Examples: all colors correct
Scenario: | r g y c | r g y c | bbbb |
Given the secret code is r g y c
When I guess r g y c
Then the mark should be bbbb
Scenario: | r g y c | r g c y | bbww |
Given the secret code is r g y c
When I guess r g c y
Then the mark should be bbww
2 scenarios (2 undefined)
8 steps (8 undefined)
"""