cuke_modeler 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.simplecov +8 -0
- data/Gemfile +4 -0
- data/History.rdoc +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +73 -0
- data/Rakefile +38 -0
- data/cuke_modeler.gemspec +29 -0
- data/features/analysis/test_comparison.feature +123 -0
- data/features/analysis/test_manipulation.feature +37 -0
- data/features/modeling/background_modeling.feature +75 -0
- data/features/modeling/background_output.feature +130 -0
- data/features/modeling/directory_modeling.feature +120 -0
- data/features/modeling/directory_output.feature +13 -0
- data/features/modeling/doc_string_modeling.feature +63 -0
- data/features/modeling/doc_string_output.feature +71 -0
- data/features/modeling/example_modeling.feature +111 -0
- data/features/modeling/example_output.feature +192 -0
- data/features/modeling/feature_file_modeling.feature +64 -0
- data/features/modeling/feature_file_output.feature +13 -0
- data/features/modeling/feature_modeling.feature +164 -0
- data/features/modeling/feature_output.feature +244 -0
- data/features/modeling/outline_modeling.feature +100 -0
- data/features/modeling/outline_output.feature +197 -0
- data/features/modeling/row_modeling.feature +77 -0
- data/features/modeling/row_output.feature +27 -0
- data/features/modeling/scenario_modeling.feature +89 -0
- data/features/modeling/scenario_output.feature +147 -0
- data/features/modeling/step_modeling.feature +85 -0
- data/features/modeling/step_output.feature +52 -0
- data/features/modeling/table_modeling.feature +52 -0
- data/features/modeling/table_output.feature +42 -0
- data/features/modeling/table_row_modeling.feature +67 -0
- data/features/modeling/table_row_output.feature +27 -0
- data/features/modeling/tag_modeling.feature +58 -0
- data/features/modeling/tag_output.feature +16 -0
- data/features/step_definitions/action_steps.rb +3 -0
- data/features/step_definitions/background_steps.rb +81 -0
- data/features/step_definitions/directory_steps.rb +52 -0
- data/features/step_definitions/doc_string_steps.rb +63 -0
- data/features/step_definitions/feature_file_steps.rb +41 -0
- data/features/step_definitions/feature_steps.rb +96 -0
- data/features/step_definitions/outline_steps.rb +252 -0
- data/features/step_definitions/setup_steps.rb +50 -0
- data/features/step_definitions/spec_steps.rb +18 -0
- data/features/step_definitions/step_steps.rb +159 -0
- data/features/step_definitions/table_steps.rb +54 -0
- data/features/step_definitions/tag_steps.rb +61 -0
- data/features/step_definitions/test_steps.rb +114 -0
- data/features/step_definitions/verification_steps.rb +9 -0
- data/features/support/env.rb +27 -0
- data/features/support/transforms.rb +3 -0
- data/lib/cuke_modeler.rb +29 -0
- data/lib/cuke_modeler/background.rb +38 -0
- data/lib/cuke_modeler/containing.rb +18 -0
- data/lib/cuke_modeler/directory.rb +86 -0
- data/lib/cuke_modeler/doc_string.rb +87 -0
- data/lib/cuke_modeler/example.rb +184 -0
- data/lib/cuke_modeler/feature.rb +147 -0
- data/lib/cuke_modeler/feature_element.rb +73 -0
- data/lib/cuke_modeler/feature_file.rb +77 -0
- data/lib/cuke_modeler/nested.rb +34 -0
- data/lib/cuke_modeler/outline.rb +68 -0
- data/lib/cuke_modeler/parsing.rb +32 -0
- data/lib/cuke_modeler/raw.rb +20 -0
- data/lib/cuke_modeler/row.rb +64 -0
- data/lib/cuke_modeler/scenario.rb +45 -0
- data/lib/cuke_modeler/sourceable.rb +20 -0
- data/lib/cuke_modeler/step.rb +214 -0
- data/lib/cuke_modeler/table.rb +90 -0
- data/lib/cuke_modeler/table_row.rb +64 -0
- data/lib/cuke_modeler/tag.rb +62 -0
- data/lib/cuke_modeler/taggable.rb +54 -0
- data/lib/cuke_modeler/test_element.rb +77 -0
- data/lib/cuke_modeler/version.rb +3 -0
- data/lib/cuke_modeler/world.rb +113 -0
- data/spec/integration/background_integration_spec.rb +72 -0
- data/spec/integration/directory_integration_spec.rb +48 -0
- data/spec/integration/doc_string_integration_spec.rb +66 -0
- data/spec/integration/example_integration_spec.rb +94 -0
- data/spec/integration/feature_file_integration_spec.rb +44 -0
- data/spec/integration/feature_integration_spec.rb +152 -0
- data/spec/integration/outline_integration_spec.rb +92 -0
- data/spec/integration/scenario_integration_spec.rb +80 -0
- data/spec/integration/step_integration_spec.rb +184 -0
- data/spec/integration/table_integration_spec.rb +86 -0
- data/spec/integration/table_row_integration_spec.rb +68 -0
- data/spec/integration/tag_integration_spec.rb +67 -0
- data/spec/integration/world_integration_spec.rb +13 -0
- data/spec/spec_helper.rb +30 -0
- data/spec/unit/background_unit_spec.rb +55 -0
- data/spec/unit/bare_bones_unit_specs.rb +13 -0
- data/spec/unit/containing_element_unit_specs.rb +17 -0
- data/spec/unit/directory_unit_spec.rb +103 -0
- data/spec/unit/doc_string_unit_spec.rb +109 -0
- data/spec/unit/example_unit_spec.rb +251 -0
- data/spec/unit/feature_element_unit_spec.rb +19 -0
- data/spec/unit/feature_element_unit_specs.rb +46 -0
- data/spec/unit/feature_file_unit_spec.rb +94 -0
- data/spec/unit/feature_unit_spec.rb +135 -0
- data/spec/unit/nested_element_unit_specs.rb +36 -0
- data/spec/unit/nested_unit_spec.rb +37 -0
- data/spec/unit/outline_unit_spec.rb +91 -0
- data/spec/unit/parsing_unit_spec.rb +21 -0
- data/spec/unit/prepopulated_unit_specs.rb +13 -0
- data/spec/unit/raw_element_unit_specs.rb +24 -0
- data/spec/unit/raw_unit_spec.rb +25 -0
- data/spec/unit/row_unit_spec.rb +55 -0
- data/spec/unit/scenario_unit_spec.rb +71 -0
- data/spec/unit/sourceable_unit_spec.rb +17 -0
- data/spec/unit/sourced_element_unit_specs.rb +18 -0
- data/spec/unit/step_unit_spec.rb +259 -0
- data/spec/unit/table_row_unit_spec.rb +55 -0
- data/spec/unit/table_unit_spec.rb +96 -0
- data/spec/unit/tag_unit_spec.rb +51 -0
- data/spec/unit/taggable_unit_spec.rb +78 -0
- data/spec/unit/tagged_element_unit_specs.rb +63 -0
- data/spec/unit/test_element_unit_spec.rb +40 -0
- data/spec/unit/test_element_unit_specs.rb +31 -0
- data/spec/unit/world_unit_spec.rb +130 -0
- metadata +364 -0
@@ -0,0 +1,192 @@
|
|
1
|
+
Feature: Outputting example elements
|
2
|
+
|
3
|
+
The output of an element model is a representation of the element as it would
|
4
|
+
appear in gherkin.
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: Output of an example that does not have a name
|
8
|
+
Given an example element based on the following gherkin:
|
9
|
+
"""
|
10
|
+
Examples:
|
11
|
+
|param|
|
12
|
+
"""
|
13
|
+
When it is outputted
|
14
|
+
Then the following text is provided:
|
15
|
+
"""
|
16
|
+
Examples:
|
17
|
+
| param |
|
18
|
+
"""
|
19
|
+
|
20
|
+
Scenario: Output of an example that does have a name
|
21
|
+
Given an example element based on the following gherkin:
|
22
|
+
"""
|
23
|
+
Examples: with a name
|
24
|
+
|param|
|
25
|
+
"""
|
26
|
+
When it is outputted
|
27
|
+
Then the following text is provided:
|
28
|
+
"""
|
29
|
+
Examples: with a name
|
30
|
+
| param |
|
31
|
+
"""
|
32
|
+
|
33
|
+
Scenario: Output of an example that does not have tags
|
34
|
+
Given an example element based on the following gherkin:
|
35
|
+
"""
|
36
|
+
Examples:
|
37
|
+
|param|
|
38
|
+
"""
|
39
|
+
When it is outputted
|
40
|
+
Then the following text is provided:
|
41
|
+
"""
|
42
|
+
Examples:
|
43
|
+
| param |
|
44
|
+
"""
|
45
|
+
|
46
|
+
Scenario: Output of an example that does have tags
|
47
|
+
Given an example element based on the following gherkin:
|
48
|
+
"""
|
49
|
+
@tag1@tag2
|
50
|
+
@tag3
|
51
|
+
Examples:
|
52
|
+
|param|
|
53
|
+
"""
|
54
|
+
When it is outputted
|
55
|
+
Then the following text is provided:
|
56
|
+
"""
|
57
|
+
@tag1 @tag2 @tag3
|
58
|
+
Examples:
|
59
|
+
| param |
|
60
|
+
"""
|
61
|
+
|
62
|
+
Scenario: Output of an example that has a description, no first line buffer
|
63
|
+
Given an example element based on the following gherkin:
|
64
|
+
"""
|
65
|
+
Examples:
|
66
|
+
Some description.
|
67
|
+
Some more description.
|
68
|
+
|param|
|
69
|
+
"""
|
70
|
+
When it is outputted
|
71
|
+
Then the following text is provided:
|
72
|
+
"""
|
73
|
+
Examples:
|
74
|
+
|
75
|
+
Some description.
|
76
|
+
Some more description.
|
77
|
+
|
78
|
+
| param |
|
79
|
+
"""
|
80
|
+
|
81
|
+
Scenario: Output of an example that has a description, first line is blank
|
82
|
+
Given an example element based on the following gherkin:
|
83
|
+
"""
|
84
|
+
Examples:
|
85
|
+
|
86
|
+
Some description.
|
87
|
+
Some more description.
|
88
|
+
|param|
|
89
|
+
"""
|
90
|
+
When it is outputted
|
91
|
+
Then the following text is provided:
|
92
|
+
"""
|
93
|
+
Examples:
|
94
|
+
|
95
|
+
Some description.
|
96
|
+
Some more description.
|
97
|
+
|
98
|
+
| param |
|
99
|
+
"""
|
100
|
+
|
101
|
+
Scenario: Output of an example that has a description, first line is only whitespace
|
102
|
+
Given an example element based on the following gherkin:
|
103
|
+
"""
|
104
|
+
Examples:
|
105
|
+
|
106
|
+
Some description.
|
107
|
+
Some more description.
|
108
|
+
|param|
|
109
|
+
"""
|
110
|
+
When it is outputted
|
111
|
+
Then the following text is provided:
|
112
|
+
"""
|
113
|
+
Examples:
|
114
|
+
|
115
|
+
Some description.
|
116
|
+
Some more description.
|
117
|
+
|
118
|
+
| param |
|
119
|
+
"""
|
120
|
+
|
121
|
+
Scenario: Output of an example that has one rows
|
122
|
+
Given an example element based on the following gherkin:
|
123
|
+
"""
|
124
|
+
Examples:
|
125
|
+
|param1|param2|
|
126
|
+
|value1|value2|
|
127
|
+
"""
|
128
|
+
When it is outputted
|
129
|
+
Then the following text is provided:
|
130
|
+
"""
|
131
|
+
Examples:
|
132
|
+
| param1 | param2 |
|
133
|
+
| value1 | value2 |
|
134
|
+
"""
|
135
|
+
|
136
|
+
Scenario: Output of an example that has multiple rows
|
137
|
+
Given an example element based on the following gherkin:
|
138
|
+
"""
|
139
|
+
Examples:
|
140
|
+
|param1|param2|
|
141
|
+
|value1|value2|
|
142
|
+
|value3|value4|
|
143
|
+
"""
|
144
|
+
When it is outputted
|
145
|
+
Then the following text is provided:
|
146
|
+
"""
|
147
|
+
Examples:
|
148
|
+
| param1 | param2 |
|
149
|
+
| value1 | value2 |
|
150
|
+
| value3 | value4 |
|
151
|
+
"""
|
152
|
+
|
153
|
+
Scenario: Output of an example that contains all possible parts
|
154
|
+
Given an example element based on the following gherkin:
|
155
|
+
"""
|
156
|
+
@tag1@tag2
|
157
|
+
@tag3
|
158
|
+
Examples: with a name
|
159
|
+
Some description.
|
160
|
+
Some more description.
|
161
|
+
|param1|param2|
|
162
|
+
|value1|value2|
|
163
|
+
|value3|value4|
|
164
|
+
"""
|
165
|
+
When it is outputted
|
166
|
+
Then the following text is provided:
|
167
|
+
"""
|
168
|
+
@tag1 @tag2 @tag3
|
169
|
+
Examples: with a name
|
170
|
+
|
171
|
+
Some description.
|
172
|
+
Some more description.
|
173
|
+
|
174
|
+
| param1 | param2 |
|
175
|
+
| value1 | value2 |
|
176
|
+
| value3 | value4 |
|
177
|
+
"""
|
178
|
+
|
179
|
+
Scenario: Whitespace buffers are based on the longest value or parameter in a column
|
180
|
+
Given an example element based on the following gherkin:
|
181
|
+
"""
|
182
|
+
Examples:
|
183
|
+
|parameter_name|x|
|
184
|
+
|y|value_name|
|
185
|
+
"""
|
186
|
+
When it is outputted
|
187
|
+
Then the following text is provided:
|
188
|
+
"""
|
189
|
+
Examples:
|
190
|
+
| parameter_name | x |
|
191
|
+
| y | value_name |
|
192
|
+
"""
|
@@ -0,0 +1,64 @@
|
|
1
|
+
Feature: Feature files can be modeled.
|
2
|
+
|
3
|
+
|
4
|
+
Acceptance criteria
|
5
|
+
|
6
|
+
1. All conceptual pieces of a .feature file can be modeled:
|
7
|
+
- the file's name
|
8
|
+
- the file's full path
|
9
|
+
- the file's features (one or zero per file)
|
10
|
+
|
11
|
+
2. Feature files can be outputted in a convenient form
|
12
|
+
|
13
|
+
|
14
|
+
Background: Test file setup.
|
15
|
+
Given the following feature file "test_file_1.feature":
|
16
|
+
"""
|
17
|
+
Feature: The first test feature
|
18
|
+
Just a dummy feature.
|
19
|
+
"""
|
20
|
+
And the following feature file "test_file_2.feature":
|
21
|
+
"""
|
22
|
+
Feature: The second test feature
|
23
|
+
Just a dummy feature.
|
24
|
+
"""
|
25
|
+
And the following feature file "why_would_you_make_an_empty_file.feature":
|
26
|
+
"""
|
27
|
+
"""
|
28
|
+
When the file "test_file_1.feature" is read
|
29
|
+
And the file "test_file_2.feature" is read
|
30
|
+
And the file "why_would_you_make_an_empty_file.feature" is read
|
31
|
+
|
32
|
+
|
33
|
+
Scenario: The file's feature is modeled.
|
34
|
+
Then file "1" is found to have the following properties:
|
35
|
+
| name | test_file_1.feature |
|
36
|
+
| path | path_to/test_file_1.feature |
|
37
|
+
| feature_count | 1 |
|
38
|
+
And file "1" features are as follows:
|
39
|
+
| The first test feature |
|
40
|
+
Then file "2" is found to have the following properties:
|
41
|
+
| name | test_file_2.feature |
|
42
|
+
| path | path_to/test_file_2.feature |
|
43
|
+
| feature_count | 1 |
|
44
|
+
And file "2" features are as follows:
|
45
|
+
| The second test feature |
|
46
|
+
Then file "3" is found to have the following properties:
|
47
|
+
| name | why_would_you_make_an_empty_file.feature |
|
48
|
+
| path | path_to/why_would_you_make_an_empty_file.feature |
|
49
|
+
| feature_count | 0 |
|
50
|
+
And file "3" has no features
|
51
|
+
|
52
|
+
Scenario: Convenient output of a feature file
|
53
|
+
Then the feature file has convenient output
|
54
|
+
|
55
|
+
@redundant
|
56
|
+
Scenario Outline: Feature file models pass all other specifications
|
57
|
+
Exact specifications detailing the API for .feature file models.
|
58
|
+
Given that there are "<additional specifications>" detailing models
|
59
|
+
When the corresponding specifications are run
|
60
|
+
Then all of those specifications are met
|
61
|
+
Examples:
|
62
|
+
| additional specifications |
|
63
|
+
| feature_file_unit_spec.rb |
|
64
|
+
| feature_file_integration_spec.rb |
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Feature: Outputting feature file elements
|
2
|
+
|
3
|
+
The output of an element model is a representation of the element as it would
|
4
|
+
appear in gherkin.
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: Output of a feature file
|
8
|
+
Given a feature file element based on "some_feature_file.feature"
|
9
|
+
When it is outputted
|
10
|
+
Then the following text is provided:
|
11
|
+
"""
|
12
|
+
path_to/some_feature_file.feature
|
13
|
+
"""
|
@@ -0,0 +1,164 @@
|
|
1
|
+
Feature: Features can be modeled.
|
2
|
+
|
3
|
+
|
4
|
+
Acceptance criteria
|
5
|
+
|
6
|
+
1. All conceptual pieces of a feature can be modeled:
|
7
|
+
- the feature's name
|
8
|
+
- the feature's description
|
9
|
+
- the feature's tags
|
10
|
+
- the feature's scenarios
|
11
|
+
- the feature's outlines
|
12
|
+
- the feature's background
|
13
|
+
- the feature's total number of tests
|
14
|
+
- the feature's total number of test cases
|
15
|
+
- the feature's source line
|
16
|
+
- the feature's raw element
|
17
|
+
|
18
|
+
2. Features can be outputted in a convenient form
|
19
|
+
|
20
|
+
|
21
|
+
Background: Test file setup.
|
22
|
+
Given the following feature file "much_stuff.feature":
|
23
|
+
"""
|
24
|
+
@a_feature_level_tag @and_another
|
25
|
+
|
26
|
+
Feature: The test feature name.
|
27
|
+
|
28
|
+
Some feature description.
|
29
|
+
|
30
|
+
Some more.
|
31
|
+
And some more.
|
32
|
+
|
33
|
+
Background: Some general test setup stuff.
|
34
|
+
* some setup step
|
35
|
+
|
36
|
+
Scenario: The first scenario's name.
|
37
|
+
* a step
|
38
|
+
|
39
|
+
Scenario Outline: The scenario outline's name.
|
40
|
+
* a step
|
41
|
+
Examples:
|
42
|
+
| param |
|
43
|
+
| x |
|
44
|
+
| y |
|
45
|
+
Examples:
|
46
|
+
| param |
|
47
|
+
| z |
|
48
|
+
|
49
|
+
Scenario: The second scenario's name.
|
50
|
+
* a step
|
51
|
+
"""
|
52
|
+
And the following feature file "barely_any_stuff.feature":
|
53
|
+
"""
|
54
|
+
Feature:
|
55
|
+
|
56
|
+
Background:
|
57
|
+
|
58
|
+
Scenario:
|
59
|
+
|
60
|
+
Scenario Outline:
|
61
|
+
Examples:
|
62
|
+
"""
|
63
|
+
And the following feature file "as_empty_as_it_gets.feature":
|
64
|
+
"""
|
65
|
+
Feature:
|
66
|
+
"""
|
67
|
+
When the file "much_stuff.feature" is read
|
68
|
+
And the file "barely_any_stuff.feature" is read
|
69
|
+
And the file "as_empty_as_it_gets.feature" is read
|
70
|
+
|
71
|
+
|
72
|
+
Scenario: The raw feature element is modeled.
|
73
|
+
Then the feature correctly stores its underlying implementation
|
74
|
+
|
75
|
+
Scenario: The feature's properties are modeled.
|
76
|
+
Then feature "1" is found to have the following properties:
|
77
|
+
| name | The test feature name. |
|
78
|
+
| test_count | 3 |
|
79
|
+
| test_case_count | 5 |
|
80
|
+
| source_line | 3 |
|
81
|
+
And feature "2" is found to have the following properties:
|
82
|
+
| name | |
|
83
|
+
| test_count | 2 |
|
84
|
+
| test_case_count | 1 |
|
85
|
+
| source_line | 1 |
|
86
|
+
|
87
|
+
And feature "3" is found to have the following properties:
|
88
|
+
| name | |
|
89
|
+
| test_count | 0 |
|
90
|
+
| test_case_count | 0 |
|
91
|
+
| source_line | 1 |
|
92
|
+
|
93
|
+
Scenario: The feature's description is modeled.
|
94
|
+
Then feature "1" has the following description:
|
95
|
+
"""
|
96
|
+
|
97
|
+
Some feature description.
|
98
|
+
|
99
|
+
Some more.
|
100
|
+
And some more.
|
101
|
+
"""
|
102
|
+
And feature "2" has no description
|
103
|
+
And feature "3" has no description
|
104
|
+
|
105
|
+
Scenario: The feature's tags are modeled.
|
106
|
+
Then feature "1" is found to have the following tags:
|
107
|
+
| @a_feature_level_tag |
|
108
|
+
| @and_another |
|
109
|
+
And feature "2" has no tags
|
110
|
+
And feature "3" has no tags
|
111
|
+
|
112
|
+
Scenario: The feature's scenarios are modeled.
|
113
|
+
Then feature "1" is found to have the following properties:
|
114
|
+
| scenario_count | 2 |
|
115
|
+
And feature "1" scenarios are as follows:
|
116
|
+
| The first scenario's name. |
|
117
|
+
| The second scenario's name. |
|
118
|
+
And feature "2" is found to have the following properties:
|
119
|
+
| scenario_count | 1 |
|
120
|
+
And feature "2" scenarios are as follows:
|
121
|
+
| |
|
122
|
+
And feature "3" is found to have the following properties:
|
123
|
+
| scenario_count | 0 |
|
124
|
+
And feature "3" has no scenarios
|
125
|
+
|
126
|
+
Scenario: The feature's outlines are modeled.
|
127
|
+
Then feature "1" is found to have the following properties:
|
128
|
+
| outline_count | 1 |
|
129
|
+
And feature "1" outlines are as follows:
|
130
|
+
| The scenario outline's name. |
|
131
|
+
And feature "2" is found to have the following properties:
|
132
|
+
| outline_count | 1 |
|
133
|
+
And feature "2" outlines are as follows:
|
134
|
+
| |
|
135
|
+
And feature "3" is found to have the following properties:
|
136
|
+
| outline_count | 0 |
|
137
|
+
And feature "3" has no outlines
|
138
|
+
|
139
|
+
Scenario: The feature's background is modeled.
|
140
|
+
Then feature "1" is found to have the following properties:
|
141
|
+
| has_background? | true |
|
142
|
+
And feature "1" background is as follows:
|
143
|
+
| Some general test setup stuff. |
|
144
|
+
And feature "2" is found to have the following properties:
|
145
|
+
| has_background? | true |
|
146
|
+
And feature "2" background is as follows:
|
147
|
+
| |
|
148
|
+
And feature "3" is found to have the following properties:
|
149
|
+
| has_background? | false |
|
150
|
+
And feature "3" has no background
|
151
|
+
|
152
|
+
Scenario: Convenient output of a feature
|
153
|
+
Then the feature has convenient output
|
154
|
+
|
155
|
+
@redundant
|
156
|
+
Scenario Outline: Feature models pass all other specifications
|
157
|
+
Exact specifications detailing the API for feature models.
|
158
|
+
Given that there are "<additional specifications>" detailing models
|
159
|
+
When the corresponding specifications are run
|
160
|
+
Then all of those specifications are met
|
161
|
+
Examples:
|
162
|
+
| additional specifications |
|
163
|
+
| feature_unit_spec.rb |
|
164
|
+
| feature_integration_spec.rb |
|
@@ -0,0 +1,244 @@
|
|
1
|
+
Feature: Outputting feature elements
|
2
|
+
|
3
|
+
The output of an element model is a representation of the element as it would
|
4
|
+
appear in gherkin.
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: Output of a feature that does not have a name
|
8
|
+
Given a feature element based on the following gherkin:
|
9
|
+
"""
|
10
|
+
Feature:
|
11
|
+
"""
|
12
|
+
When it is outputted
|
13
|
+
Then the following text is provided:
|
14
|
+
"""
|
15
|
+
Feature:
|
16
|
+
"""
|
17
|
+
|
18
|
+
Scenario: Output of a feature that does have a name
|
19
|
+
Given a feature element based on the following gherkin:
|
20
|
+
"""
|
21
|
+
Feature: with a name
|
22
|
+
"""
|
23
|
+
When it is outputted
|
24
|
+
Then the following text is provided:
|
25
|
+
"""
|
26
|
+
Feature: with a name
|
27
|
+
"""
|
28
|
+
|
29
|
+
Scenario: Output of a feature that has tags
|
30
|
+
Given a feature element based on the following gherkin:
|
31
|
+
"""
|
32
|
+
@tag1@tag2
|
33
|
+
@tag3
|
34
|
+
Feature:
|
35
|
+
"""
|
36
|
+
When it is outputted
|
37
|
+
Then the following text is provided:
|
38
|
+
"""
|
39
|
+
@tag1 @tag2 @tag3
|
40
|
+
Feature:
|
41
|
+
"""
|
42
|
+
|
43
|
+
Scenario: Output of a feature that has a description, no first line buffer
|
44
|
+
Given a feature element based on the following gherkin:
|
45
|
+
"""
|
46
|
+
Feature:
|
47
|
+
Some description.
|
48
|
+
Some more description.
|
49
|
+
"""
|
50
|
+
When it is outputted
|
51
|
+
Then the following text is provided:
|
52
|
+
"""
|
53
|
+
Feature:
|
54
|
+
|
55
|
+
Some description.
|
56
|
+
Some more description.
|
57
|
+
"""
|
58
|
+
|
59
|
+
Scenario: Output of a feature that has a description, first line is blank
|
60
|
+
Given a feature element based on the following gherkin:
|
61
|
+
"""
|
62
|
+
Feature:
|
63
|
+
|
64
|
+
Some description.
|
65
|
+
Some more description.
|
66
|
+
"""
|
67
|
+
When it is outputted
|
68
|
+
Then the following text is provided:
|
69
|
+
"""
|
70
|
+
Feature:
|
71
|
+
|
72
|
+
Some description.
|
73
|
+
Some more description.
|
74
|
+
"""
|
75
|
+
|
76
|
+
Scenario: Output of a feature that has a description, first line is only whitespace
|
77
|
+
Given a feature element based on the following gherkin:
|
78
|
+
"""
|
79
|
+
Feature:
|
80
|
+
|
81
|
+
Some description.
|
82
|
+
Some more description.
|
83
|
+
"""
|
84
|
+
When it is outputted
|
85
|
+
Then the following text is provided:
|
86
|
+
"""
|
87
|
+
Feature:
|
88
|
+
|
89
|
+
Some description.
|
90
|
+
Some more description.
|
91
|
+
"""
|
92
|
+
|
93
|
+
Scenario: Output of a feature that has a background
|
94
|
+
Given a feature element based on the following gherkin:
|
95
|
+
"""
|
96
|
+
Feature:
|
97
|
+
|
98
|
+
Background:
|
99
|
+
* a step
|
100
|
+
* another step
|
101
|
+
"""
|
102
|
+
When it is outputted
|
103
|
+
Then the following text is provided:
|
104
|
+
"""
|
105
|
+
Feature:
|
106
|
+
|
107
|
+
Background:
|
108
|
+
* a step
|
109
|
+
* another step
|
110
|
+
"""
|
111
|
+
|
112
|
+
Scenario: Output of a feature that has a scenario
|
113
|
+
Given a feature element based on the following gherkin:
|
114
|
+
"""
|
115
|
+
Feature:
|
116
|
+
|
117
|
+
Scenario:
|
118
|
+
* a step
|
119
|
+
* another step
|
120
|
+
"""
|
121
|
+
When it is outputted
|
122
|
+
Then the following text is provided:
|
123
|
+
"""
|
124
|
+
Feature:
|
125
|
+
|
126
|
+
Scenario:
|
127
|
+
* a step
|
128
|
+
* another step
|
129
|
+
"""
|
130
|
+
|
131
|
+
Scenario: Output of a feature that has an outline
|
132
|
+
Given a feature element based on the following gherkin:
|
133
|
+
"""
|
134
|
+
Feature:
|
135
|
+
|
136
|
+
Scenario Outline:
|
137
|
+
* a step
|
138
|
+
* another step
|
139
|
+
Examples:
|
140
|
+
|param|
|
141
|
+
"""
|
142
|
+
When it is outputted
|
143
|
+
Then the following text is provided:
|
144
|
+
"""
|
145
|
+
Feature:
|
146
|
+
|
147
|
+
Scenario Outline:
|
148
|
+
* a step
|
149
|
+
* another step
|
150
|
+
|
151
|
+
Examples:
|
152
|
+
| param |
|
153
|
+
"""
|
154
|
+
|
155
|
+
Scenario: Output of a feature that contains all possible parts
|
156
|
+
Given a feature element based on the following gherkin:
|
157
|
+
"""
|
158
|
+
@tag1@tag2
|
159
|
+
@tag3
|
160
|
+
Feature: A feature with everything it could have
|
161
|
+
Including a description
|
162
|
+
and then some.
|
163
|
+
Background:
|
164
|
+
Background
|
165
|
+
description
|
166
|
+
* a step
|
167
|
+
|value1|
|
168
|
+
* another step
|
169
|
+
@scenario_tag
|
170
|
+
Scenario:
|
171
|
+
Scenario
|
172
|
+
description
|
173
|
+
* a step
|
174
|
+
* another step
|
175
|
+
\"\"\"
|
176
|
+
some text
|
177
|
+
\"\"\"
|
178
|
+
@outline_tag
|
179
|
+
Scenario Outline:
|
180
|
+
Outline
|
181
|
+
description
|
182
|
+
* a step
|
183
|
+
|value2|
|
184
|
+
* another step
|
185
|
+
\"\"\"
|
186
|
+
some text
|
187
|
+
\"\"\"
|
188
|
+
@example_tag
|
189
|
+
Examples:
|
190
|
+
Example
|
191
|
+
description
|
192
|
+
|param|
|
193
|
+
"""
|
194
|
+
When it is outputted
|
195
|
+
Then the following text is provided:
|
196
|
+
"""
|
197
|
+
@tag1 @tag2 @tag3
|
198
|
+
Feature: A feature with everything it could have
|
199
|
+
|
200
|
+
Including a description
|
201
|
+
and then some.
|
202
|
+
|
203
|
+
Background:
|
204
|
+
|
205
|
+
Background
|
206
|
+
description
|
207
|
+
|
208
|
+
* a step
|
209
|
+
| value1 |
|
210
|
+
* another step
|
211
|
+
|
212
|
+
@scenario_tag
|
213
|
+
Scenario:
|
214
|
+
|
215
|
+
Scenario
|
216
|
+
description
|
217
|
+
|
218
|
+
* a step
|
219
|
+
* another step
|
220
|
+
\"\"\"
|
221
|
+
some text
|
222
|
+
\"\"\"
|
223
|
+
|
224
|
+
@outline_tag
|
225
|
+
Scenario Outline:
|
226
|
+
|
227
|
+
Outline
|
228
|
+
description
|
229
|
+
|
230
|
+
* a step
|
231
|
+
| value2 |
|
232
|
+
* another step
|
233
|
+
\"\"\"
|
234
|
+
some text
|
235
|
+
\"\"\"
|
236
|
+
|
237
|
+
@example_tag
|
238
|
+
Examples:
|
239
|
+
|
240
|
+
Example
|
241
|
+
description
|
242
|
+
|
243
|
+
| param |
|
244
|
+
"""
|