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,171 +1,171 @@
|
|
|
1
|
-
Feature: Rule modeling
|
|
2
|
-
|
|
3
|
-
Rule models represent a Rule portion of a feature. They expose several attributes of the rule that they
|
|
4
|
-
represent, as well as containing models for any background, scenarios, outlines, and tags that are present
|
|
5
|
-
in that rule.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Background:
|
|
9
|
-
Given the following gherkin:
|
|
10
|
-
"""
|
|
11
|
-
Rule: Rule Foo
|
|
12
|
-
|
|
13
|
-
Some rule description.
|
|
14
|
-
|
|
15
|
-
Some more.
|
|
16
|
-
And some more.
|
|
17
|
-
|
|
18
|
-
Background: The background
|
|
19
|
-
* some setup step
|
|
20
|
-
|
|
21
|
-
Scenario: Scenario 1
|
|
22
|
-
* a step
|
|
23
|
-
|
|
24
|
-
Scenario Outline: Outline 1
|
|
25
|
-
* a step
|
|
26
|
-
Examples:
|
|
27
|
-
| param |
|
|
28
|
-
| value |
|
|
29
|
-
|
|
30
|
-
Scenario: Scenario 2
|
|
31
|
-
* a step
|
|
32
|
-
"""
|
|
33
|
-
And a feature model based on that gherkin
|
|
34
|
-
"""
|
|
35
|
-
@model = CukeModeler::Rule.new(<source_text>)
|
|
36
|
-
"""
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Scenario: Modeling a rule's keyword
|
|
40
|
-
When the rule's keyword is requested
|
|
41
|
-
"""
|
|
42
|
-
@model.keyword
|
|
43
|
-
"""
|
|
44
|
-
Then the model returns "Rule"
|
|
45
|
-
|
|
46
|
-
Scenario: Modeling a rule's name
|
|
47
|
-
When the rule's name is requested
|
|
48
|
-
"""
|
|
49
|
-
@model.name
|
|
50
|
-
"""
|
|
51
|
-
Then the model returns "Rule Foo"
|
|
52
|
-
|
|
53
|
-
Scenario: Modeling a rule's description
|
|
54
|
-
When the rule's description is requested
|
|
55
|
-
"""
|
|
56
|
-
@model.description
|
|
57
|
-
"""
|
|
58
|
-
Then the model returns
|
|
59
|
-
"""
|
|
60
|
-
Some rule description.
|
|
61
|
-
|
|
62
|
-
Some more.
|
|
63
|
-
And some more.
|
|
64
|
-
"""
|
|
65
|
-
|
|
66
|
-
Scenario: Modeling a rule's background
|
|
67
|
-
When the rule's background is requested
|
|
68
|
-
"""
|
|
69
|
-
@model.background
|
|
70
|
-
"""
|
|
71
|
-
Then the model returns a model for the background "The background"
|
|
72
|
-
|
|
73
|
-
Scenario: Modeling a rule's scenarios
|
|
74
|
-
When the rule's scenarios are requested
|
|
75
|
-
"""
|
|
76
|
-
@model.scenarios
|
|
77
|
-
"""
|
|
78
|
-
Then the model returns models for the following scenarios:
|
|
79
|
-
| Scenario 1 |
|
|
80
|
-
| Scenario 2 |
|
|
81
|
-
|
|
82
|
-
Scenario: Modeling a rule's outlines
|
|
83
|
-
When the rule's outlines are requested
|
|
84
|
-
"""
|
|
85
|
-
@model.outlines
|
|
86
|
-
"""
|
|
87
|
-
Then the model returns models for the following outlines:
|
|
88
|
-
| Outline 1 |
|
|
89
|
-
|
|
90
|
-
@gherkin_min_version_18
|
|
91
|
-
Scenario: Modeling a rules's tags
|
|
92
|
-
Given the following gherkin:
|
|
93
|
-
"""
|
|
94
|
-
@feature_tag
|
|
95
|
-
Feature:
|
|
96
|
-
|
|
97
|
-
@rule_tag_1
|
|
98
|
-
@rule_tag_2
|
|
99
|
-
Rule:
|
|
100
|
-
"""
|
|
101
|
-
And a feature model based on that gherkin
|
|
102
|
-
"""
|
|
103
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
104
|
-
"""
|
|
105
|
-
And the rule model of that feature model
|
|
106
|
-
"""
|
|
107
|
-
@model = @model.rules.first
|
|
108
|
-
"""
|
|
109
|
-
When the rules's tags are requested
|
|
110
|
-
"""
|
|
111
|
-
@model.tags
|
|
112
|
-
"""
|
|
113
|
-
Then the model returns models for the following tags:
|
|
114
|
-
| @rule_tag_1 |
|
|
115
|
-
| @rule_tag_2 |
|
|
116
|
-
When the rule's inherited tags are requested
|
|
117
|
-
"""
|
|
118
|
-
@model.applied_tags
|
|
119
|
-
"""
|
|
120
|
-
Then the model returns models for the following tags:
|
|
121
|
-
| @feature_tag |
|
|
122
|
-
When all of the rule's tags are requested
|
|
123
|
-
"""
|
|
124
|
-
@model.all_tags
|
|
125
|
-
"""
|
|
126
|
-
Then the model returns models for the following tags:
|
|
127
|
-
| @feature_tag |
|
|
128
|
-
| @rule_tag_1 |
|
|
129
|
-
| @rule_tag_2 |
|
|
130
|
-
|
|
131
|
-
Scenario: Modeling a rule's source line
|
|
132
|
-
Given the following gherkin:
|
|
133
|
-
"""
|
|
134
|
-
Feature:
|
|
135
|
-
|
|
136
|
-
Rule:
|
|
137
|
-
"""
|
|
138
|
-
And a feature model based on that gherkin
|
|
139
|
-
"""
|
|
140
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
141
|
-
"""
|
|
142
|
-
And the rule model of that feature model
|
|
143
|
-
"""
|
|
144
|
-
@model = @model.rules.first
|
|
145
|
-
"""
|
|
146
|
-
When the rule's source line is requested
|
|
147
|
-
"""
|
|
148
|
-
@model.source_line
|
|
149
|
-
"""
|
|
150
|
-
Then the model returns "3"
|
|
151
|
-
|
|
152
|
-
Scenario: Modeling a rule's source column
|
|
153
|
-
Given the following gherkin:
|
|
154
|
-
"""
|
|
155
|
-
Feature:
|
|
156
|
-
|
|
157
|
-
Rule:
|
|
158
|
-
"""
|
|
159
|
-
And a feature model based on that gherkin
|
|
160
|
-
"""
|
|
161
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
162
|
-
"""
|
|
163
|
-
And the rule model of that feature model
|
|
164
|
-
"""
|
|
165
|
-
@model = @model.rules.first
|
|
166
|
-
"""
|
|
167
|
-
When the rule's source column is requested
|
|
168
|
-
"""
|
|
169
|
-
@model.source_column
|
|
170
|
-
"""
|
|
171
|
-
Then the model returns "3"
|
|
1
|
+
Feature: Rule modeling
|
|
2
|
+
|
|
3
|
+
Rule models represent a Rule portion of a feature. They expose several attributes of the rule that they
|
|
4
|
+
represent, as well as containing models for any background, scenarios, outlines, and tags that are present
|
|
5
|
+
in that rule.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Background:
|
|
9
|
+
Given the following gherkin:
|
|
10
|
+
"""
|
|
11
|
+
Rule: Rule Foo
|
|
12
|
+
|
|
13
|
+
Some rule description.
|
|
14
|
+
|
|
15
|
+
Some more.
|
|
16
|
+
And some more.
|
|
17
|
+
|
|
18
|
+
Background: The background
|
|
19
|
+
* some setup step
|
|
20
|
+
|
|
21
|
+
Scenario: Scenario 1
|
|
22
|
+
* a step
|
|
23
|
+
|
|
24
|
+
Scenario Outline: Outline 1
|
|
25
|
+
* a step
|
|
26
|
+
Examples:
|
|
27
|
+
| param |
|
|
28
|
+
| value |
|
|
29
|
+
|
|
30
|
+
Scenario: Scenario 2
|
|
31
|
+
* a step
|
|
32
|
+
"""
|
|
33
|
+
And a feature model based on that gherkin
|
|
34
|
+
"""
|
|
35
|
+
@model = CukeModeler::Rule.new(<source_text>)
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
Scenario: Modeling a rule's keyword
|
|
40
|
+
When the rule's keyword is requested
|
|
41
|
+
"""
|
|
42
|
+
@model.keyword
|
|
43
|
+
"""
|
|
44
|
+
Then the model returns "Rule"
|
|
45
|
+
|
|
46
|
+
Scenario: Modeling a rule's name
|
|
47
|
+
When the rule's name is requested
|
|
48
|
+
"""
|
|
49
|
+
@model.name
|
|
50
|
+
"""
|
|
51
|
+
Then the model returns "Rule Foo"
|
|
52
|
+
|
|
53
|
+
Scenario: Modeling a rule's description
|
|
54
|
+
When the rule's description is requested
|
|
55
|
+
"""
|
|
56
|
+
@model.description
|
|
57
|
+
"""
|
|
58
|
+
Then the model returns
|
|
59
|
+
"""
|
|
60
|
+
Some rule description.
|
|
61
|
+
|
|
62
|
+
Some more.
|
|
63
|
+
And some more.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
Scenario: Modeling a rule's background
|
|
67
|
+
When the rule's background is requested
|
|
68
|
+
"""
|
|
69
|
+
@model.background
|
|
70
|
+
"""
|
|
71
|
+
Then the model returns a model for the background "The background"
|
|
72
|
+
|
|
73
|
+
Scenario: Modeling a rule's scenarios
|
|
74
|
+
When the rule's scenarios are requested
|
|
75
|
+
"""
|
|
76
|
+
@model.scenarios
|
|
77
|
+
"""
|
|
78
|
+
Then the model returns models for the following scenarios:
|
|
79
|
+
| Scenario 1 |
|
|
80
|
+
| Scenario 2 |
|
|
81
|
+
|
|
82
|
+
Scenario: Modeling a rule's outlines
|
|
83
|
+
When the rule's outlines are requested
|
|
84
|
+
"""
|
|
85
|
+
@model.outlines
|
|
86
|
+
"""
|
|
87
|
+
Then the model returns models for the following outlines:
|
|
88
|
+
| Outline 1 |
|
|
89
|
+
|
|
90
|
+
@gherkin_min_version_18
|
|
91
|
+
Scenario: Modeling a rules's tags
|
|
92
|
+
Given the following gherkin:
|
|
93
|
+
"""
|
|
94
|
+
@feature_tag
|
|
95
|
+
Feature:
|
|
96
|
+
|
|
97
|
+
@rule_tag_1
|
|
98
|
+
@rule_tag_2
|
|
99
|
+
Rule:
|
|
100
|
+
"""
|
|
101
|
+
And a feature model based on that gherkin
|
|
102
|
+
"""
|
|
103
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
104
|
+
"""
|
|
105
|
+
And the rule model of that feature model
|
|
106
|
+
"""
|
|
107
|
+
@model = @model.rules.first
|
|
108
|
+
"""
|
|
109
|
+
When the rules's tags are requested
|
|
110
|
+
"""
|
|
111
|
+
@model.tags
|
|
112
|
+
"""
|
|
113
|
+
Then the model returns models for the following tags:
|
|
114
|
+
| @rule_tag_1 |
|
|
115
|
+
| @rule_tag_2 |
|
|
116
|
+
When the rule's inherited tags are requested
|
|
117
|
+
"""
|
|
118
|
+
@model.applied_tags
|
|
119
|
+
"""
|
|
120
|
+
Then the model returns models for the following tags:
|
|
121
|
+
| @feature_tag |
|
|
122
|
+
When all of the rule's tags are requested
|
|
123
|
+
"""
|
|
124
|
+
@model.all_tags
|
|
125
|
+
"""
|
|
126
|
+
Then the model returns models for the following tags:
|
|
127
|
+
| @feature_tag |
|
|
128
|
+
| @rule_tag_1 |
|
|
129
|
+
| @rule_tag_2 |
|
|
130
|
+
|
|
131
|
+
Scenario: Modeling a rule's source line
|
|
132
|
+
Given the following gherkin:
|
|
133
|
+
"""
|
|
134
|
+
Feature:
|
|
135
|
+
|
|
136
|
+
Rule:
|
|
137
|
+
"""
|
|
138
|
+
And a feature model based on that gherkin
|
|
139
|
+
"""
|
|
140
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
141
|
+
"""
|
|
142
|
+
And the rule model of that feature model
|
|
143
|
+
"""
|
|
144
|
+
@model = @model.rules.first
|
|
145
|
+
"""
|
|
146
|
+
When the rule's source line is requested
|
|
147
|
+
"""
|
|
148
|
+
@model.source_line
|
|
149
|
+
"""
|
|
150
|
+
Then the model returns "3"
|
|
151
|
+
|
|
152
|
+
Scenario: Modeling a rule's source column
|
|
153
|
+
Given the following gherkin:
|
|
154
|
+
"""
|
|
155
|
+
Feature:
|
|
156
|
+
|
|
157
|
+
Rule:
|
|
158
|
+
"""
|
|
159
|
+
And a feature model based on that gherkin
|
|
160
|
+
"""
|
|
161
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
162
|
+
"""
|
|
163
|
+
And the rule model of that feature model
|
|
164
|
+
"""
|
|
165
|
+
@model = @model.rules.first
|
|
166
|
+
"""
|
|
167
|
+
When the rule's source column is requested
|
|
168
|
+
"""
|
|
169
|
+
@model.source_column
|
|
170
|
+
"""
|
|
171
|
+
Then the model returns "3"
|
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
Feature: Rule output
|
|
2
|
-
|
|
3
|
-
A rule model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the name of the rule that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@gherkin_min_version_18
|
|
8
|
-
Scenario: Stringify a rule model
|
|
9
|
-
Given the following gherkin:
|
|
10
|
-
"""
|
|
11
|
-
@tag1@tag2
|
|
12
|
-
@tag3
|
|
13
|
-
Rule: A rule with everything it could have
|
|
14
|
-
Including a description
|
|
15
|
-
and then some.
|
|
16
|
-
Background: a background
|
|
17
|
-
Background
|
|
18
|
-
description
|
|
19
|
-
* a step
|
|
20
|
-
|value1|
|
|
21
|
-
|value2|
|
|
22
|
-
* another step
|
|
23
|
-
@scenario_tag
|
|
24
|
-
Scenario: a scenario
|
|
25
|
-
Scenario
|
|
26
|
-
description
|
|
27
|
-
* a step
|
|
28
|
-
* another step
|
|
29
|
-
\"\"\" with content type
|
|
30
|
-
some text
|
|
31
|
-
\"\"\"
|
|
32
|
-
@outline_tag
|
|
33
|
-
Scenario Outline: an outline
|
|
34
|
-
Outline
|
|
35
|
-
description
|
|
36
|
-
* a step
|
|
37
|
-
|value2|
|
|
38
|
-
* another step
|
|
39
|
-
\"\"\"
|
|
40
|
-
some text
|
|
41
|
-
\"\"\"
|
|
42
|
-
@example_tag
|
|
43
|
-
Examples:
|
|
44
|
-
Example
|
|
45
|
-
description
|
|
46
|
-
|param|
|
|
47
|
-
|value|
|
|
48
|
-
Examples: additional example
|
|
49
|
-
"""
|
|
50
|
-
And a rule model based on that gherkin
|
|
51
|
-
"""
|
|
52
|
-
@model = CukeModeler::Rule.new(<source_text>)
|
|
53
|
-
"""
|
|
54
|
-
When the model is output as a string
|
|
55
|
-
"""
|
|
56
|
-
@model.to_s
|
|
57
|
-
"""
|
|
58
|
-
Then the following text is provided:
|
|
59
|
-
"""
|
|
60
|
-
@tag1 @tag2 @tag3
|
|
61
|
-
Rule: A rule with everything it could have
|
|
62
|
-
|
|
63
|
-
Including a description
|
|
64
|
-
and then some.
|
|
65
|
-
|
|
66
|
-
Background: a background
|
|
67
|
-
|
|
68
|
-
Background
|
|
69
|
-
description
|
|
70
|
-
|
|
71
|
-
* a step
|
|
72
|
-
| value1 |
|
|
73
|
-
| value2 |
|
|
74
|
-
* another step
|
|
75
|
-
|
|
76
|
-
@scenario_tag
|
|
77
|
-
Scenario: a scenario
|
|
78
|
-
|
|
79
|
-
Scenario
|
|
80
|
-
description
|
|
81
|
-
|
|
82
|
-
* a step
|
|
83
|
-
* another step
|
|
84
|
-
\"\"\" with content type
|
|
85
|
-
some text
|
|
86
|
-
\"\"\"
|
|
87
|
-
|
|
88
|
-
@outline_tag
|
|
89
|
-
Scenario Outline: an outline
|
|
90
|
-
|
|
91
|
-
Outline
|
|
92
|
-
description
|
|
93
|
-
|
|
94
|
-
* a step
|
|
95
|
-
| value2 |
|
|
96
|
-
* another step
|
|
97
|
-
\"\"\"
|
|
98
|
-
some text
|
|
99
|
-
\"\"\"
|
|
100
|
-
|
|
101
|
-
@example_tag
|
|
102
|
-
Examples:
|
|
103
|
-
|
|
104
|
-
Example
|
|
105
|
-
description
|
|
106
|
-
|
|
107
|
-
| param |
|
|
108
|
-
| value |
|
|
109
|
-
|
|
110
|
-
Examples: additional example
|
|
111
|
-
"""
|
|
112
|
-
And the output can be used to make an equivalent model
|
|
113
|
-
"""
|
|
114
|
-
CukeModeler::Rule.new(@model.to_s)
|
|
115
|
-
"""
|
|
116
|
-
|
|
117
|
-
Scenario: Inspect a rule model
|
|
118
|
-
Given the following gherkin:
|
|
119
|
-
"""
|
|
120
|
-
Rule: some rule
|
|
121
|
-
|
|
122
|
-
Scenario: a scenario
|
|
123
|
-
* a step
|
|
124
|
-
"""
|
|
125
|
-
And a rule model based on that gherkin
|
|
126
|
-
"""
|
|
127
|
-
@model = CukeModeler::Rule.new(<source_text>)
|
|
128
|
-
"""
|
|
129
|
-
When the model is inspected
|
|
130
|
-
"""
|
|
131
|
-
@model.inspect
|
|
132
|
-
"""
|
|
133
|
-
Then the following text is provided:
|
|
134
|
-
"""
|
|
135
|
-
#<CukeModeler::Rule:<object_id> @name: "some rule">
|
|
136
|
-
"""
|
|
1
|
+
Feature: Rule output
|
|
2
|
+
|
|
3
|
+
A rule model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the name of the rule that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@gherkin_min_version_18
|
|
8
|
+
Scenario: Stringify a rule model
|
|
9
|
+
Given the following gherkin:
|
|
10
|
+
"""
|
|
11
|
+
@tag1@tag2
|
|
12
|
+
@tag3
|
|
13
|
+
Rule: A rule with everything it could have
|
|
14
|
+
Including a description
|
|
15
|
+
and then some.
|
|
16
|
+
Background: a background
|
|
17
|
+
Background
|
|
18
|
+
description
|
|
19
|
+
* a step
|
|
20
|
+
|value1|
|
|
21
|
+
|value2|
|
|
22
|
+
* another step
|
|
23
|
+
@scenario_tag
|
|
24
|
+
Scenario: a scenario
|
|
25
|
+
Scenario
|
|
26
|
+
description
|
|
27
|
+
* a step
|
|
28
|
+
* another step
|
|
29
|
+
\"\"\" with content type
|
|
30
|
+
some text
|
|
31
|
+
\"\"\"
|
|
32
|
+
@outline_tag
|
|
33
|
+
Scenario Outline: an outline
|
|
34
|
+
Outline
|
|
35
|
+
description
|
|
36
|
+
* a step
|
|
37
|
+
|value2|
|
|
38
|
+
* another step
|
|
39
|
+
\"\"\"
|
|
40
|
+
some text
|
|
41
|
+
\"\"\"
|
|
42
|
+
@example_tag
|
|
43
|
+
Examples:
|
|
44
|
+
Example
|
|
45
|
+
description
|
|
46
|
+
|param|
|
|
47
|
+
|value|
|
|
48
|
+
Examples: additional example
|
|
49
|
+
"""
|
|
50
|
+
And a rule model based on that gherkin
|
|
51
|
+
"""
|
|
52
|
+
@model = CukeModeler::Rule.new(<source_text>)
|
|
53
|
+
"""
|
|
54
|
+
When the model is output as a string
|
|
55
|
+
"""
|
|
56
|
+
@model.to_s
|
|
57
|
+
"""
|
|
58
|
+
Then the following text is provided:
|
|
59
|
+
"""
|
|
60
|
+
@tag1 @tag2 @tag3
|
|
61
|
+
Rule: A rule with everything it could have
|
|
62
|
+
|
|
63
|
+
Including a description
|
|
64
|
+
and then some.
|
|
65
|
+
|
|
66
|
+
Background: a background
|
|
67
|
+
|
|
68
|
+
Background
|
|
69
|
+
description
|
|
70
|
+
|
|
71
|
+
* a step
|
|
72
|
+
| value1 |
|
|
73
|
+
| value2 |
|
|
74
|
+
* another step
|
|
75
|
+
|
|
76
|
+
@scenario_tag
|
|
77
|
+
Scenario: a scenario
|
|
78
|
+
|
|
79
|
+
Scenario
|
|
80
|
+
description
|
|
81
|
+
|
|
82
|
+
* a step
|
|
83
|
+
* another step
|
|
84
|
+
\"\"\" with content type
|
|
85
|
+
some text
|
|
86
|
+
\"\"\"
|
|
87
|
+
|
|
88
|
+
@outline_tag
|
|
89
|
+
Scenario Outline: an outline
|
|
90
|
+
|
|
91
|
+
Outline
|
|
92
|
+
description
|
|
93
|
+
|
|
94
|
+
* a step
|
|
95
|
+
| value2 |
|
|
96
|
+
* another step
|
|
97
|
+
\"\"\"
|
|
98
|
+
some text
|
|
99
|
+
\"\"\"
|
|
100
|
+
|
|
101
|
+
@example_tag
|
|
102
|
+
Examples:
|
|
103
|
+
|
|
104
|
+
Example
|
|
105
|
+
description
|
|
106
|
+
|
|
107
|
+
| param |
|
|
108
|
+
| value |
|
|
109
|
+
|
|
110
|
+
Examples: additional example
|
|
111
|
+
"""
|
|
112
|
+
And the output can be used to make an equivalent model
|
|
113
|
+
"""
|
|
114
|
+
CukeModeler::Rule.new(@model.to_s)
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
Scenario: Inspect a rule model
|
|
118
|
+
Given the following gherkin:
|
|
119
|
+
"""
|
|
120
|
+
Rule: some rule
|
|
121
|
+
|
|
122
|
+
Scenario: a scenario
|
|
123
|
+
* a step
|
|
124
|
+
"""
|
|
125
|
+
And a rule model based on that gherkin
|
|
126
|
+
"""
|
|
127
|
+
@model = CukeModeler::Rule.new(<source_text>)
|
|
128
|
+
"""
|
|
129
|
+
When the model is inspected
|
|
130
|
+
"""
|
|
131
|
+
@model.inspect
|
|
132
|
+
"""
|
|
133
|
+
Then the following text is provided:
|
|
134
|
+
"""
|
|
135
|
+
#<CukeModeler::Rule:<object_id> @name: "some rule">
|
|
136
|
+
"""
|