cuke_modeler 3.27.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +579 -572
- data/LICENSE.txt +22 -22
- data/README.md +135 -135
- data/cuke_modeler.gemspec +59 -59
- data/lib/cuke_modeler/adapters/gherkin_10_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_11_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_12_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_13_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_14_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_15_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_16_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_17_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_18_adapter.rb +27 -27
- data/lib/cuke_modeler/adapters/gherkin_19_adapter.rb +64 -64
- data/lib/cuke_modeler/adapters/gherkin_20_adapter.rb +359 -359
- data/lib/cuke_modeler/adapters/gherkin_21_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_22_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_23_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_24_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_25_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_26_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_27_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_28_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_29_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_30_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_31_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_32_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_33_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_34_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_35_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_36_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_37_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_38_adapter.rb +13 -0
- data/lib/cuke_modeler/adapters/gherkin_9_adapter.rb +375 -375
- data/lib/cuke_modeler/adapters/gherkin_base_adapter.rb +17 -17
- data/lib/cuke_modeler/containing.rb +105 -105
- data/lib/cuke_modeler/described.rb +71 -71
- data/lib/cuke_modeler/models/background.rb +122 -122
- data/lib/cuke_modeler/models/cell.rb +88 -88
- data/lib/cuke_modeler/models/comment.rb +82 -82
- data/lib/cuke_modeler/models/directory.rb +143 -143
- data/lib/cuke_modeler/models/doc_string.rb +104 -104
- data/lib/cuke_modeler/models/example.rb +274 -274
- data/lib/cuke_modeler/models/feature.rb +200 -200
- data/lib/cuke_modeler/models/feature_file.rb +116 -116
- data/lib/cuke_modeler/models/model.rb +87 -87
- data/lib/cuke_modeler/models/outline.rb +145 -145
- data/lib/cuke_modeler/models/row.rb +104 -104
- data/lib/cuke_modeler/models/rule.rb +162 -162
- data/lib/cuke_modeler/models/scenario.rb +128 -128
- data/lib/cuke_modeler/models/step.rb +178 -178
- data/lib/cuke_modeler/models/table.rb +117 -117
- data/lib/cuke_modeler/models/tag.rb +75 -75
- data/lib/cuke_modeler/named.rb +26 -26
- data/lib/cuke_modeler/nested.rb +61 -61
- data/lib/cuke_modeler/parsed.rb +24 -24
- data/lib/cuke_modeler/parsing.rb +208 -208
- data/lib/cuke_modeler/sourceable.rb +29 -29
- data/lib/cuke_modeler/stepped.rb +34 -34
- data/lib/cuke_modeler/taggable.rb +57 -57
- data/lib/cuke_modeler/version.rb +4 -4
- data/lib/cuke_modeler.rb +32 -32
- data/testing/cucumber/features/analysis/step_comparison.feature +25 -25
- data/testing/cucumber/features/analysis/test_comparison.feature +35 -35
- data/testing/cucumber/features/modeling/background_modeling.feature +105 -105
- data/testing/cucumber/features/modeling/background_output.feature +60 -60
- data/testing/cucumber/features/modeling/cell_modeling.feature +68 -68
- data/testing/cucumber/features/modeling/cell_output.feature +36 -36
- data/testing/cucumber/features/modeling/comment_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/comment_output.feature +40 -40
- data/testing/cucumber/features/modeling/directory_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/directory_output.feature +33 -33
- data/testing/cucumber/features/modeling/doc_string_modeling.feature +85 -85
- data/testing/cucumber/features/modeling/doc_string_output.feature +50 -50
- data/testing/cucumber/features/modeling/example_modeling.feature +155 -155
- data/testing/cucumber/features/modeling/example_output.feature +57 -57
- data/testing/cucumber/features/modeling/feature_file_modeling.feature +49 -49
- data/testing/cucumber/features/modeling/feature_file_output.feature +33 -33
- data/testing/cucumber/features/modeling/feature_modeling.feature +149 -149
- data/testing/cucumber/features/modeling/feature_output.feature +144 -144
- data/testing/cucumber/features/modeling/model_output.feature +61 -61
- data/testing/cucumber/features/modeling/model_structure.feature +42 -42
- data/testing/cucumber/features/modeling/outline_modeling.feature +175 -175
- data/testing/cucumber/features/modeling/outline_output.feature +87 -87
- data/testing/cucumber/features/modeling/row_modeling.feature +70 -70
- data/testing/cucumber/features/modeling/row_output.feature +40 -40
- data/testing/cucumber/features/modeling/rule_modeling.feature +171 -171
- data/testing/cucumber/features/modeling/rule_output.feature +136 -136
- data/testing/cucumber/features/modeling/scenario_modeling.feature +146 -146
- data/testing/cucumber/features/modeling/scenario_output.feature +63 -63
- data/testing/cucumber/features/modeling/step_modeling.feature +105 -105
- data/testing/cucumber/features/modeling/step_output.feature +47 -47
- data/testing/cucumber/features/modeling/table_modeling.feature +73 -73
- data/testing/cucumber/features/modeling/table_output.feature +42 -42
- data/testing/cucumber/features/modeling/tag_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/tag_output.feature +40 -40
- metadata +6 -8
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
Feature: Feature file output
|
|
2
|
-
|
|
3
|
-
A feature file model's string output is simply the file path of the feature file that it models and its
|
|
4
|
-
most relevant attribute for inspection is the path of the feature file that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given a feature file model based on "some_feature_file.feature"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Scenario: Stringify a feature file model
|
|
12
|
-
When the model is output as a string
|
|
13
|
-
"""
|
|
14
|
-
@model.to_s
|
|
15
|
-
"""
|
|
16
|
-
Then the following text is provided:
|
|
17
|
-
"""
|
|
18
|
-
<path_to>/some_feature_file.feature
|
|
19
|
-
"""
|
|
20
|
-
And the output can be used to make an equivalent model
|
|
21
|
-
"""
|
|
22
|
-
CukeModeler::FeatureFile.new(@model.to_s)
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
Scenario: Inspect a feature file model
|
|
26
|
-
When the model is inspected
|
|
27
|
-
"""
|
|
28
|
-
@model.inspect
|
|
29
|
-
"""
|
|
30
|
-
Then the following text is provided:
|
|
31
|
-
"""
|
|
32
|
-
#<CukeModeler::FeatureFile:<object_id> @path: "<path_to>/some_feature_file.feature">
|
|
33
|
-
"""
|
|
1
|
+
Feature: Feature file output
|
|
2
|
+
|
|
3
|
+
A feature file model's string output is simply the file path of the feature file that it models and its
|
|
4
|
+
most relevant attribute for inspection is the path of the feature file that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given a feature file model based on "some_feature_file.feature"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Scenario: Stringify a feature file model
|
|
12
|
+
When the model is output as a string
|
|
13
|
+
"""
|
|
14
|
+
@model.to_s
|
|
15
|
+
"""
|
|
16
|
+
Then the following text is provided:
|
|
17
|
+
"""
|
|
18
|
+
<path_to>/some_feature_file.feature
|
|
19
|
+
"""
|
|
20
|
+
And the output can be used to make an equivalent model
|
|
21
|
+
"""
|
|
22
|
+
CukeModeler::FeatureFile.new(@model.to_s)
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
Scenario: Inspect a feature file model
|
|
26
|
+
When the model is inspected
|
|
27
|
+
"""
|
|
28
|
+
@model.inspect
|
|
29
|
+
"""
|
|
30
|
+
Then the following text is provided:
|
|
31
|
+
"""
|
|
32
|
+
#<CukeModeler::FeatureFile:<object_id> @path: "<path_to>/some_feature_file.feature">
|
|
33
|
+
"""
|
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
Feature: Feature modeling
|
|
2
|
-
|
|
3
|
-
Feature models are the top level element of the Gherkin portion of the model tree. They expose several attributes of the
|
|
4
|
-
feature that they represent, as well as containing models for any background, scenarios, or outlines that are present in
|
|
5
|
-
that feature.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Background:
|
|
9
|
-
Given the following gherkin:
|
|
10
|
-
"""
|
|
11
|
-
# language: en
|
|
12
|
-
@tag_1 @tag_2
|
|
13
|
-
Feature: Feature Foo
|
|
14
|
-
|
|
15
|
-
Some feature description.
|
|
16
|
-
|
|
17
|
-
Some more.
|
|
18
|
-
And some more.
|
|
19
|
-
|
|
20
|
-
Background: The background
|
|
21
|
-
* some setup step
|
|
22
|
-
|
|
23
|
-
Scenario: Scenario 1
|
|
24
|
-
* a step
|
|
25
|
-
|
|
26
|
-
Scenario Outline: Outline 1
|
|
27
|
-
* a step
|
|
28
|
-
Examples:
|
|
29
|
-
| param |
|
|
30
|
-
| value |
|
|
31
|
-
|
|
32
|
-
Scenario: Scenario 2
|
|
33
|
-
* a step
|
|
34
|
-
|
|
35
|
-
Rule: a rule
|
|
36
|
-
|
|
37
|
-
Scenario: Scenario 3
|
|
38
|
-
* a step
|
|
39
|
-
|
|
40
|
-
Rule: another rule
|
|
41
|
-
|
|
42
|
-
Scenario Outline: Outline 2
|
|
43
|
-
* a step
|
|
44
|
-
Examples:
|
|
45
|
-
| param |
|
|
46
|
-
| value |
|
|
47
|
-
"""
|
|
48
|
-
And a feature model based on that gherkin
|
|
49
|
-
"""
|
|
50
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
Scenario: Modeling a feature's keyword
|
|
55
|
-
When the feature's keyword is requested
|
|
56
|
-
"""
|
|
57
|
-
@model.keyword
|
|
58
|
-
"""
|
|
59
|
-
Then the model returns "Feature"
|
|
60
|
-
|
|
61
|
-
Scenario: Modeling a feature's name
|
|
62
|
-
When the feature's name is requested
|
|
63
|
-
"""
|
|
64
|
-
@model.name
|
|
65
|
-
"""
|
|
66
|
-
Then the model returns "Feature Foo"
|
|
67
|
-
|
|
68
|
-
Scenario: Modeling a feature's description
|
|
69
|
-
When the feature's description is requested
|
|
70
|
-
"""
|
|
71
|
-
@model.description
|
|
72
|
-
"""
|
|
73
|
-
Then the model returns
|
|
74
|
-
"""
|
|
75
|
-
Some feature description.
|
|
76
|
-
|
|
77
|
-
Some more.
|
|
78
|
-
And some more.
|
|
79
|
-
"""
|
|
80
|
-
|
|
81
|
-
Scenario: Modeling a feature's background
|
|
82
|
-
When the feature's background is requested
|
|
83
|
-
"""
|
|
84
|
-
@model.background
|
|
85
|
-
"""
|
|
86
|
-
Then the model returns a model for the background "The background"
|
|
87
|
-
|
|
88
|
-
Scenario: Modeling a feature's rules
|
|
89
|
-
When the feature's rules are requested
|
|
90
|
-
"""
|
|
91
|
-
@model.rules
|
|
92
|
-
"""
|
|
93
|
-
Then the model returns models for the following rules:
|
|
94
|
-
| a rule |
|
|
95
|
-
| another rule |
|
|
96
|
-
|
|
97
|
-
Scenario: Modeling a feature's scenarios
|
|
98
|
-
Note: Scenarios under a Rule keyword are included in the corresponding Rule model instead of the Feature model
|
|
99
|
-
|
|
100
|
-
When the feature's scenarios are requested
|
|
101
|
-
"""
|
|
102
|
-
@model.scenarios
|
|
103
|
-
"""
|
|
104
|
-
Then the model returns models for the following scenarios:
|
|
105
|
-
| Scenario 1 |
|
|
106
|
-
| Scenario 2 |
|
|
107
|
-
|
|
108
|
-
Scenario: Modeling a feature's outlines
|
|
109
|
-
Note: Outlines under a Rule keyword are included in the corresponding Rule model instead of the Feature model
|
|
110
|
-
|
|
111
|
-
When the feature's outlines are requested
|
|
112
|
-
"""
|
|
113
|
-
@model.outlines
|
|
114
|
-
"""
|
|
115
|
-
Then the model returns models for the following outlines:
|
|
116
|
-
| Outline 1 |
|
|
117
|
-
|
|
118
|
-
Scenario: Modeling a feature's tags
|
|
119
|
-
|
|
120
|
-
Note: Although a feature does not inherit tags from anything else, they can still be requested in the same manner as other models that have tags.
|
|
121
|
-
|
|
122
|
-
When the feature's tags are requested
|
|
123
|
-
"""
|
|
124
|
-
@model.tags
|
|
125
|
-
"""
|
|
126
|
-
Then the model returns models for the following tags:
|
|
127
|
-
| @tag_1 |
|
|
128
|
-
| @tag_2 |
|
|
129
|
-
|
|
130
|
-
Scenario: Modeling a feature's source line
|
|
131
|
-
When the feature's source line is requested
|
|
132
|
-
"""
|
|
133
|
-
@model.source_line
|
|
134
|
-
"""
|
|
135
|
-
Then the model returns "3"
|
|
136
|
-
|
|
137
|
-
Scenario: Modeling a feature's source column
|
|
138
|
-
When the feature's source column is requested
|
|
139
|
-
"""
|
|
140
|
-
@model.source_column
|
|
141
|
-
"""
|
|
142
|
-
Then the model returns "1"
|
|
143
|
-
|
|
144
|
-
Scenario: Modeling a feature's language
|
|
145
|
-
When the feature's language is requested
|
|
146
|
-
"""
|
|
147
|
-
@model.language
|
|
148
|
-
"""
|
|
149
|
-
Then the model returns "en"
|
|
1
|
+
Feature: Feature modeling
|
|
2
|
+
|
|
3
|
+
Feature models are the top level element of the Gherkin portion of the model tree. They expose several attributes of the
|
|
4
|
+
feature that they represent, as well as containing models for any background, scenarios, or outlines that are present in
|
|
5
|
+
that feature.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Background:
|
|
9
|
+
Given the following gherkin:
|
|
10
|
+
"""
|
|
11
|
+
# language: en
|
|
12
|
+
@tag_1 @tag_2
|
|
13
|
+
Feature: Feature Foo
|
|
14
|
+
|
|
15
|
+
Some feature description.
|
|
16
|
+
|
|
17
|
+
Some more.
|
|
18
|
+
And some more.
|
|
19
|
+
|
|
20
|
+
Background: The background
|
|
21
|
+
* some setup step
|
|
22
|
+
|
|
23
|
+
Scenario: Scenario 1
|
|
24
|
+
* a step
|
|
25
|
+
|
|
26
|
+
Scenario Outline: Outline 1
|
|
27
|
+
* a step
|
|
28
|
+
Examples:
|
|
29
|
+
| param |
|
|
30
|
+
| value |
|
|
31
|
+
|
|
32
|
+
Scenario: Scenario 2
|
|
33
|
+
* a step
|
|
34
|
+
|
|
35
|
+
Rule: a rule
|
|
36
|
+
|
|
37
|
+
Scenario: Scenario 3
|
|
38
|
+
* a step
|
|
39
|
+
|
|
40
|
+
Rule: another rule
|
|
41
|
+
|
|
42
|
+
Scenario Outline: Outline 2
|
|
43
|
+
* a step
|
|
44
|
+
Examples:
|
|
45
|
+
| param |
|
|
46
|
+
| value |
|
|
47
|
+
"""
|
|
48
|
+
And a feature model based on that gherkin
|
|
49
|
+
"""
|
|
50
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Scenario: Modeling a feature's keyword
|
|
55
|
+
When the feature's keyword is requested
|
|
56
|
+
"""
|
|
57
|
+
@model.keyword
|
|
58
|
+
"""
|
|
59
|
+
Then the model returns "Feature"
|
|
60
|
+
|
|
61
|
+
Scenario: Modeling a feature's name
|
|
62
|
+
When the feature's name is requested
|
|
63
|
+
"""
|
|
64
|
+
@model.name
|
|
65
|
+
"""
|
|
66
|
+
Then the model returns "Feature Foo"
|
|
67
|
+
|
|
68
|
+
Scenario: Modeling a feature's description
|
|
69
|
+
When the feature's description is requested
|
|
70
|
+
"""
|
|
71
|
+
@model.description
|
|
72
|
+
"""
|
|
73
|
+
Then the model returns
|
|
74
|
+
"""
|
|
75
|
+
Some feature description.
|
|
76
|
+
|
|
77
|
+
Some more.
|
|
78
|
+
And some more.
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
Scenario: Modeling a feature's background
|
|
82
|
+
When the feature's background is requested
|
|
83
|
+
"""
|
|
84
|
+
@model.background
|
|
85
|
+
"""
|
|
86
|
+
Then the model returns a model for the background "The background"
|
|
87
|
+
|
|
88
|
+
Scenario: Modeling a feature's rules
|
|
89
|
+
When the feature's rules are requested
|
|
90
|
+
"""
|
|
91
|
+
@model.rules
|
|
92
|
+
"""
|
|
93
|
+
Then the model returns models for the following rules:
|
|
94
|
+
| a rule |
|
|
95
|
+
| another rule |
|
|
96
|
+
|
|
97
|
+
Scenario: Modeling a feature's scenarios
|
|
98
|
+
Note: Scenarios under a Rule keyword are included in the corresponding Rule model instead of the Feature model
|
|
99
|
+
|
|
100
|
+
When the feature's scenarios are requested
|
|
101
|
+
"""
|
|
102
|
+
@model.scenarios
|
|
103
|
+
"""
|
|
104
|
+
Then the model returns models for the following scenarios:
|
|
105
|
+
| Scenario 1 |
|
|
106
|
+
| Scenario 2 |
|
|
107
|
+
|
|
108
|
+
Scenario: Modeling a feature's outlines
|
|
109
|
+
Note: Outlines under a Rule keyword are included in the corresponding Rule model instead of the Feature model
|
|
110
|
+
|
|
111
|
+
When the feature's outlines are requested
|
|
112
|
+
"""
|
|
113
|
+
@model.outlines
|
|
114
|
+
"""
|
|
115
|
+
Then the model returns models for the following outlines:
|
|
116
|
+
| Outline 1 |
|
|
117
|
+
|
|
118
|
+
Scenario: Modeling a feature's tags
|
|
119
|
+
|
|
120
|
+
Note: Although a feature does not inherit tags from anything else, they can still be requested in the same manner as other models that have tags.
|
|
121
|
+
|
|
122
|
+
When the feature's tags are requested
|
|
123
|
+
"""
|
|
124
|
+
@model.tags
|
|
125
|
+
"""
|
|
126
|
+
Then the model returns models for the following tags:
|
|
127
|
+
| @tag_1 |
|
|
128
|
+
| @tag_2 |
|
|
129
|
+
|
|
130
|
+
Scenario: Modeling a feature's source line
|
|
131
|
+
When the feature's source line is requested
|
|
132
|
+
"""
|
|
133
|
+
@model.source_line
|
|
134
|
+
"""
|
|
135
|
+
Then the model returns "3"
|
|
136
|
+
|
|
137
|
+
Scenario: Modeling a feature's source column
|
|
138
|
+
When the feature's source column is requested
|
|
139
|
+
"""
|
|
140
|
+
@model.source_column
|
|
141
|
+
"""
|
|
142
|
+
Then the model returns "1"
|
|
143
|
+
|
|
144
|
+
Scenario: Modeling a feature's language
|
|
145
|
+
When the feature's language is requested
|
|
146
|
+
"""
|
|
147
|
+
@model.language
|
|
148
|
+
"""
|
|
149
|
+
Then the model returns "en"
|
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
Feature: Feature output
|
|
2
|
-
|
|
3
|
-
A feature model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the name of the feature that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the following gherkin:
|
|
9
|
-
"""
|
|
10
|
-
@tag1@tag2
|
|
11
|
-
@tag3
|
|
12
|
-
Feature: A feature with everything it could have
|
|
13
|
-
Including a description
|
|
14
|
-
and then some.
|
|
15
|
-
Background: non-nested background
|
|
16
|
-
Background
|
|
17
|
-
description
|
|
18
|
-
* a step
|
|
19
|
-
|value1|
|
|
20
|
-
|value2|
|
|
21
|
-
* another step
|
|
22
|
-
@scenario_tag
|
|
23
|
-
Scenario: non-nested scenario
|
|
24
|
-
Scenario
|
|
25
|
-
description
|
|
26
|
-
* a step
|
|
27
|
-
* another step
|
|
28
|
-
\"\"\" with content type
|
|
29
|
-
some text
|
|
30
|
-
\"\"\"
|
|
31
|
-
Rule: a rule
|
|
32
|
-
Rule description
|
|
33
|
-
Background: nested background
|
|
34
|
-
* a step
|
|
35
|
-
@outline_tag
|
|
36
|
-
Scenario Outline: nested outline
|
|
37
|
-
Outline
|
|
38
|
-
description
|
|
39
|
-
* a step
|
|
40
|
-
|value2|
|
|
41
|
-
* another step
|
|
42
|
-
\"\"\"
|
|
43
|
-
some text
|
|
44
|
-
\"\"\"
|
|
45
|
-
@example_tag
|
|
46
|
-
Examples:
|
|
47
|
-
Example
|
|
48
|
-
description
|
|
49
|
-
|param|
|
|
50
|
-
|value|
|
|
51
|
-
Examples: additional example
|
|
52
|
-
Rule: another rule
|
|
53
|
-
Which is empty
|
|
54
|
-
"""
|
|
55
|
-
And a feature model based on that gherkin
|
|
56
|
-
"""
|
|
57
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
58
|
-
"""
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Scenario: Stringify a feature model
|
|
62
|
-
When the model is output as a string
|
|
63
|
-
"""
|
|
64
|
-
@model.to_s
|
|
65
|
-
"""
|
|
66
|
-
Then the following text is provided:
|
|
67
|
-
"""
|
|
68
|
-
@tag1 @tag2 @tag3
|
|
69
|
-
Feature: A feature with everything it could have
|
|
70
|
-
|
|
71
|
-
Including a description
|
|
72
|
-
and then some.
|
|
73
|
-
|
|
74
|
-
Background: non-nested background
|
|
75
|
-
|
|
76
|
-
Background
|
|
77
|
-
description
|
|
78
|
-
|
|
79
|
-
* a step
|
|
80
|
-
| value1 |
|
|
81
|
-
| value2 |
|
|
82
|
-
* another step
|
|
83
|
-
|
|
84
|
-
@scenario_tag
|
|
85
|
-
Scenario: non-nested scenario
|
|
86
|
-
|
|
87
|
-
Scenario
|
|
88
|
-
description
|
|
89
|
-
|
|
90
|
-
* a step
|
|
91
|
-
* another step
|
|
92
|
-
\"\"\" with content type
|
|
93
|
-
some text
|
|
94
|
-
\"\"\"
|
|
95
|
-
|
|
96
|
-
Rule: a rule
|
|
97
|
-
|
|
98
|
-
Rule description
|
|
99
|
-
|
|
100
|
-
Background: nested background
|
|
101
|
-
* a step
|
|
102
|
-
|
|
103
|
-
@outline_tag
|
|
104
|
-
Scenario Outline: nested outline
|
|
105
|
-
|
|
106
|
-
Outline
|
|
107
|
-
description
|
|
108
|
-
|
|
109
|
-
* a step
|
|
110
|
-
| value2 |
|
|
111
|
-
* another step
|
|
112
|
-
\"\"\"
|
|
113
|
-
some text
|
|
114
|
-
\"\"\"
|
|
115
|
-
|
|
116
|
-
@example_tag
|
|
117
|
-
Examples:
|
|
118
|
-
|
|
119
|
-
Example
|
|
120
|
-
description
|
|
121
|
-
|
|
122
|
-
| param |
|
|
123
|
-
| value |
|
|
124
|
-
|
|
125
|
-
Examples: additional example
|
|
126
|
-
|
|
127
|
-
Rule: another rule
|
|
128
|
-
|
|
129
|
-
Which is empty
|
|
130
|
-
"""
|
|
131
|
-
And the output can be used to make an equivalent model
|
|
132
|
-
"""
|
|
133
|
-
CukeModeler::Feature.new(@model.to_s)
|
|
134
|
-
"""
|
|
135
|
-
|
|
136
|
-
Scenario: Inspect a feature model
|
|
137
|
-
When the model is inspected
|
|
138
|
-
"""
|
|
139
|
-
@model.inspect
|
|
140
|
-
"""
|
|
141
|
-
Then the following text is provided:
|
|
142
|
-
"""
|
|
143
|
-
#<CukeModeler::Feature:<object_id> @name: "A feature with everything it could have">
|
|
144
|
-
"""
|
|
1
|
+
Feature: Feature output
|
|
2
|
+
|
|
3
|
+
A feature model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the name of the feature that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given the following gherkin:
|
|
9
|
+
"""
|
|
10
|
+
@tag1@tag2
|
|
11
|
+
@tag3
|
|
12
|
+
Feature: A feature with everything it could have
|
|
13
|
+
Including a description
|
|
14
|
+
and then some.
|
|
15
|
+
Background: non-nested background
|
|
16
|
+
Background
|
|
17
|
+
description
|
|
18
|
+
* a step
|
|
19
|
+
|value1|
|
|
20
|
+
|value2|
|
|
21
|
+
* another step
|
|
22
|
+
@scenario_tag
|
|
23
|
+
Scenario: non-nested scenario
|
|
24
|
+
Scenario
|
|
25
|
+
description
|
|
26
|
+
* a step
|
|
27
|
+
* another step
|
|
28
|
+
\"\"\" with content type
|
|
29
|
+
some text
|
|
30
|
+
\"\"\"
|
|
31
|
+
Rule: a rule
|
|
32
|
+
Rule description
|
|
33
|
+
Background: nested background
|
|
34
|
+
* a step
|
|
35
|
+
@outline_tag
|
|
36
|
+
Scenario Outline: nested outline
|
|
37
|
+
Outline
|
|
38
|
+
description
|
|
39
|
+
* a step
|
|
40
|
+
|value2|
|
|
41
|
+
* another step
|
|
42
|
+
\"\"\"
|
|
43
|
+
some text
|
|
44
|
+
\"\"\"
|
|
45
|
+
@example_tag
|
|
46
|
+
Examples:
|
|
47
|
+
Example
|
|
48
|
+
description
|
|
49
|
+
|param|
|
|
50
|
+
|value|
|
|
51
|
+
Examples: additional example
|
|
52
|
+
Rule: another rule
|
|
53
|
+
Which is empty
|
|
54
|
+
"""
|
|
55
|
+
And a feature model based on that gherkin
|
|
56
|
+
"""
|
|
57
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
Scenario: Stringify a feature model
|
|
62
|
+
When the model is output as a string
|
|
63
|
+
"""
|
|
64
|
+
@model.to_s
|
|
65
|
+
"""
|
|
66
|
+
Then the following text is provided:
|
|
67
|
+
"""
|
|
68
|
+
@tag1 @tag2 @tag3
|
|
69
|
+
Feature: A feature with everything it could have
|
|
70
|
+
|
|
71
|
+
Including a description
|
|
72
|
+
and then some.
|
|
73
|
+
|
|
74
|
+
Background: non-nested background
|
|
75
|
+
|
|
76
|
+
Background
|
|
77
|
+
description
|
|
78
|
+
|
|
79
|
+
* a step
|
|
80
|
+
| value1 |
|
|
81
|
+
| value2 |
|
|
82
|
+
* another step
|
|
83
|
+
|
|
84
|
+
@scenario_tag
|
|
85
|
+
Scenario: non-nested scenario
|
|
86
|
+
|
|
87
|
+
Scenario
|
|
88
|
+
description
|
|
89
|
+
|
|
90
|
+
* a step
|
|
91
|
+
* another step
|
|
92
|
+
\"\"\" with content type
|
|
93
|
+
some text
|
|
94
|
+
\"\"\"
|
|
95
|
+
|
|
96
|
+
Rule: a rule
|
|
97
|
+
|
|
98
|
+
Rule description
|
|
99
|
+
|
|
100
|
+
Background: nested background
|
|
101
|
+
* a step
|
|
102
|
+
|
|
103
|
+
@outline_tag
|
|
104
|
+
Scenario Outline: nested outline
|
|
105
|
+
|
|
106
|
+
Outline
|
|
107
|
+
description
|
|
108
|
+
|
|
109
|
+
* a step
|
|
110
|
+
| value2 |
|
|
111
|
+
* another step
|
|
112
|
+
\"\"\"
|
|
113
|
+
some text
|
|
114
|
+
\"\"\"
|
|
115
|
+
|
|
116
|
+
@example_tag
|
|
117
|
+
Examples:
|
|
118
|
+
|
|
119
|
+
Example
|
|
120
|
+
description
|
|
121
|
+
|
|
122
|
+
| param |
|
|
123
|
+
| value |
|
|
124
|
+
|
|
125
|
+
Examples: additional example
|
|
126
|
+
|
|
127
|
+
Rule: another rule
|
|
128
|
+
|
|
129
|
+
Which is empty
|
|
130
|
+
"""
|
|
131
|
+
And the output can be used to make an equivalent model
|
|
132
|
+
"""
|
|
133
|
+
CukeModeler::Feature.new(@model.to_s)
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
Scenario: Inspect a feature model
|
|
137
|
+
When the model is inspected
|
|
138
|
+
"""
|
|
139
|
+
@model.inspect
|
|
140
|
+
"""
|
|
141
|
+
Then the following text is provided:
|
|
142
|
+
"""
|
|
143
|
+
#<CukeModeler::Feature:<object_id> @name: "A feature with everything it could have">
|
|
144
|
+
"""
|