cuke_modeler 3.27.0 → 3.29.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 +585 -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_39_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 +9 -10
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
Feature: Step output
|
|
2
|
-
|
|
3
|
-
A step model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the text of the step that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
|
|
9
|
-
Note: Outputting a step that has a doc string is accomplished in the same manner
|
|
10
|
-
|
|
11
|
-
Given the following gherkin:
|
|
12
|
-
"""
|
|
13
|
-
* a step
|
|
14
|
-
|value1|
|
|
15
|
-
|value2|
|
|
16
|
-
"""
|
|
17
|
-
And a step model based on that gherkin
|
|
18
|
-
"""
|
|
19
|
-
@model = CukeModeler::Step.new(<source_text>)
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Scenario: Stringify a step model
|
|
24
|
-
When the model is output as a string
|
|
25
|
-
"""
|
|
26
|
-
@model.to_s
|
|
27
|
-
"""
|
|
28
|
-
Then the following text is provided:
|
|
29
|
-
"""
|
|
30
|
-
* a step
|
|
31
|
-
| value1 |
|
|
32
|
-
| value2 |
|
|
33
|
-
"""
|
|
34
|
-
And the output can be used to make an equivalent model
|
|
35
|
-
"""
|
|
36
|
-
CukeModeler::Step.new(@model.to_s)
|
|
37
|
-
"""
|
|
38
|
-
|
|
39
|
-
Scenario: Inspect a step model
|
|
40
|
-
When the model is inspected
|
|
41
|
-
"""
|
|
42
|
-
@model.inspect
|
|
43
|
-
"""
|
|
44
|
-
Then the following text is provided:
|
|
45
|
-
"""
|
|
46
|
-
#<CukeModeler::Step:<object_id> @text: "a step">
|
|
47
|
-
"""
|
|
1
|
+
Feature: Step output
|
|
2
|
+
|
|
3
|
+
A step model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the text of the step that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
|
|
9
|
+
Note: Outputting a step that has a doc string is accomplished in the same manner
|
|
10
|
+
|
|
11
|
+
Given the following gherkin:
|
|
12
|
+
"""
|
|
13
|
+
* a step
|
|
14
|
+
|value1|
|
|
15
|
+
|value2|
|
|
16
|
+
"""
|
|
17
|
+
And a step model based on that gherkin
|
|
18
|
+
"""
|
|
19
|
+
@model = CukeModeler::Step.new(<source_text>)
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Scenario: Stringify a step model
|
|
24
|
+
When the model is output as a string
|
|
25
|
+
"""
|
|
26
|
+
@model.to_s
|
|
27
|
+
"""
|
|
28
|
+
Then the following text is provided:
|
|
29
|
+
"""
|
|
30
|
+
* a step
|
|
31
|
+
| value1 |
|
|
32
|
+
| value2 |
|
|
33
|
+
"""
|
|
34
|
+
And the output can be used to make an equivalent model
|
|
35
|
+
"""
|
|
36
|
+
CukeModeler::Step.new(@model.to_s)
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
Scenario: Inspect a step model
|
|
40
|
+
When the model is inspected
|
|
41
|
+
"""
|
|
42
|
+
@model.inspect
|
|
43
|
+
"""
|
|
44
|
+
Then the following text is provided:
|
|
45
|
+
"""
|
|
46
|
+
#<CukeModeler::Step:<object_id> @text: "a step">
|
|
47
|
+
"""
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
Feature: Table modeling
|
|
2
|
-
|
|
3
|
-
Table models represent represent the table argument to a step. They expose several attributes of the table that they represent.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Background:
|
|
7
|
-
Given the following gherkin:
|
|
8
|
-
"""
|
|
9
|
-
| value 1 | value 2 |
|
|
10
|
-
| value 3 | value 4 |
|
|
11
|
-
"""
|
|
12
|
-
And a table model based on that gherkin
|
|
13
|
-
"""
|
|
14
|
-
@model = CukeModeler::Table.new(<source_text>)
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Scenario: Modeling a table's rows
|
|
19
|
-
When the table's rows are requested
|
|
20
|
-
"""
|
|
21
|
-
@model.rows
|
|
22
|
-
"""
|
|
23
|
-
Then the model returns models for the following rows:
|
|
24
|
-
| value 1 | value 2 |
|
|
25
|
-
| value 3 | value 4 |
|
|
26
|
-
|
|
27
|
-
Scenario: Modeling a table's source line
|
|
28
|
-
Given the following gherkin:
|
|
29
|
-
"""
|
|
30
|
-
Feature:
|
|
31
|
-
|
|
32
|
-
Scenario:
|
|
33
|
-
* a step
|
|
34
|
-
| value 1 |
|
|
35
|
-
| value 2 |
|
|
36
|
-
"""
|
|
37
|
-
And a feature model based on that gherkin
|
|
38
|
-
"""
|
|
39
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
40
|
-
"""
|
|
41
|
-
And the table model inside of that feature model
|
|
42
|
-
"""
|
|
43
|
-
@model = @model.tests.first.steps.first.block
|
|
44
|
-
"""
|
|
45
|
-
When the table's source line is requested
|
|
46
|
-
"""
|
|
47
|
-
@model.source_line
|
|
48
|
-
"""
|
|
49
|
-
Then the model returns "5"
|
|
50
|
-
|
|
51
|
-
Scenario: Modeling a table's source column
|
|
52
|
-
Given the following gherkin:
|
|
53
|
-
"""
|
|
54
|
-
Feature:
|
|
55
|
-
|
|
56
|
-
Scenario:
|
|
57
|
-
* a step
|
|
58
|
-
| value 1 |
|
|
59
|
-
| value 2 |
|
|
60
|
-
"""
|
|
61
|
-
And a feature model based on that gherkin
|
|
62
|
-
"""
|
|
63
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
64
|
-
"""
|
|
65
|
-
And the table model inside of that feature model
|
|
66
|
-
"""
|
|
67
|
-
@model = @model.tests.first.steps.first.block
|
|
68
|
-
"""
|
|
69
|
-
When the table's source column is requested
|
|
70
|
-
"""
|
|
71
|
-
@model.source_column
|
|
72
|
-
"""
|
|
73
|
-
Then the model returns "7"
|
|
1
|
+
Feature: Table modeling
|
|
2
|
+
|
|
3
|
+
Table models represent represent the table argument to a step. They expose several attributes of the table that they represent.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given the following gherkin:
|
|
8
|
+
"""
|
|
9
|
+
| value 1 | value 2 |
|
|
10
|
+
| value 3 | value 4 |
|
|
11
|
+
"""
|
|
12
|
+
And a table model based on that gherkin
|
|
13
|
+
"""
|
|
14
|
+
@model = CukeModeler::Table.new(<source_text>)
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Scenario: Modeling a table's rows
|
|
19
|
+
When the table's rows are requested
|
|
20
|
+
"""
|
|
21
|
+
@model.rows
|
|
22
|
+
"""
|
|
23
|
+
Then the model returns models for the following rows:
|
|
24
|
+
| value 1 | value 2 |
|
|
25
|
+
| value 3 | value 4 |
|
|
26
|
+
|
|
27
|
+
Scenario: Modeling a table's source line
|
|
28
|
+
Given the following gherkin:
|
|
29
|
+
"""
|
|
30
|
+
Feature:
|
|
31
|
+
|
|
32
|
+
Scenario:
|
|
33
|
+
* a step
|
|
34
|
+
| value 1 |
|
|
35
|
+
| value 2 |
|
|
36
|
+
"""
|
|
37
|
+
And a feature model based on that gherkin
|
|
38
|
+
"""
|
|
39
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
40
|
+
"""
|
|
41
|
+
And the table model inside of that feature model
|
|
42
|
+
"""
|
|
43
|
+
@model = @model.tests.first.steps.first.block
|
|
44
|
+
"""
|
|
45
|
+
When the table's source line is requested
|
|
46
|
+
"""
|
|
47
|
+
@model.source_line
|
|
48
|
+
"""
|
|
49
|
+
Then the model returns "5"
|
|
50
|
+
|
|
51
|
+
Scenario: Modeling a table's source column
|
|
52
|
+
Given the following gherkin:
|
|
53
|
+
"""
|
|
54
|
+
Feature:
|
|
55
|
+
|
|
56
|
+
Scenario:
|
|
57
|
+
* a step
|
|
58
|
+
| value 1 |
|
|
59
|
+
| value 2 |
|
|
60
|
+
"""
|
|
61
|
+
And a feature model based on that gherkin
|
|
62
|
+
"""
|
|
63
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
64
|
+
"""
|
|
65
|
+
And the table model inside of that feature model
|
|
66
|
+
"""
|
|
67
|
+
@model = @model.tests.first.steps.first.block
|
|
68
|
+
"""
|
|
69
|
+
When the table's source column is requested
|
|
70
|
+
"""
|
|
71
|
+
@model.source_column
|
|
72
|
+
"""
|
|
73
|
+
Then the model returns "7"
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
Feature: Table output
|
|
2
|
-
|
|
3
|
-
A table model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the collection of rows of the table that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the following gherkin:
|
|
9
|
-
"""
|
|
10
|
-
|value1|value2|
|
|
11
|
-
|value3|value4|
|
|
12
|
-
"""
|
|
13
|
-
And a table model based on that gherkin
|
|
14
|
-
"""
|
|
15
|
-
@model = CukeModeler::Table.new(<source_text>)
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Scenario: Stringify a table model
|
|
20
|
-
When the model is output as a string
|
|
21
|
-
"""
|
|
22
|
-
@model.to_s
|
|
23
|
-
"""
|
|
24
|
-
Then the following text is provided:
|
|
25
|
-
"""
|
|
26
|
-
| value1 | value2 |
|
|
27
|
-
| value3 | value4 |
|
|
28
|
-
"""
|
|
29
|
-
And the output can be used to make an equivalent model
|
|
30
|
-
"""
|
|
31
|
-
CukeModeler::Table.new(@model.to_s)
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
Scenario: Inspect a table model
|
|
35
|
-
When the model is inspected
|
|
36
|
-
"""
|
|
37
|
-
@model.inspect
|
|
38
|
-
"""
|
|
39
|
-
Then the following text is provided:
|
|
40
|
-
"""
|
|
41
|
-
#<CukeModeler::Table:<object_id> @rows: [["value1", "value2"], ["value3", "value4"]]>
|
|
42
|
-
"""
|
|
1
|
+
Feature: Table output
|
|
2
|
+
|
|
3
|
+
A table model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the collection of rows of the table that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given the following gherkin:
|
|
9
|
+
"""
|
|
10
|
+
|value1|value2|
|
|
11
|
+
|value3|value4|
|
|
12
|
+
"""
|
|
13
|
+
And a table model based on that gherkin
|
|
14
|
+
"""
|
|
15
|
+
@model = CukeModeler::Table.new(<source_text>)
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Scenario: Stringify a table model
|
|
20
|
+
When the model is output as a string
|
|
21
|
+
"""
|
|
22
|
+
@model.to_s
|
|
23
|
+
"""
|
|
24
|
+
Then the following text is provided:
|
|
25
|
+
"""
|
|
26
|
+
| value1 | value2 |
|
|
27
|
+
| value3 | value4 |
|
|
28
|
+
"""
|
|
29
|
+
And the output can be used to make an equivalent model
|
|
30
|
+
"""
|
|
31
|
+
CukeModeler::Table.new(@model.to_s)
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
Scenario: Inspect a table model
|
|
35
|
+
When the model is inspected
|
|
36
|
+
"""
|
|
37
|
+
@model.inspect
|
|
38
|
+
"""
|
|
39
|
+
Then the following text is provided:
|
|
40
|
+
"""
|
|
41
|
+
#<CukeModeler::Table:<object_id> @rows: [["value1", "value2"], ["value3", "value4"]]>
|
|
42
|
+
"""
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
Feature: Tag modeling
|
|
2
|
-
|
|
3
|
-
Tag models represent a tag portion of a feature. They expose several attributes of the tag that they represent.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Background:
|
|
7
|
-
Given the following gherkin:
|
|
8
|
-
"""
|
|
9
|
-
@a_tag
|
|
10
|
-
"""
|
|
11
|
-
And a tag model based on that gherkin
|
|
12
|
-
"""
|
|
13
|
-
@model = CukeModeler::Tag.new(<source_text>)
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Scenario: Modeling a tag's name
|
|
18
|
-
When the tag's name is requested
|
|
19
|
-
"""
|
|
20
|
-
@model.name
|
|
21
|
-
"""
|
|
22
|
-
Then the model returns "@a_tag"
|
|
23
|
-
|
|
24
|
-
Scenario: Modeling a tag's source line
|
|
25
|
-
Given the following gherkin:
|
|
26
|
-
"""
|
|
27
|
-
@a_tag
|
|
28
|
-
Feature:
|
|
29
|
-
"""
|
|
30
|
-
And a feature model based on that gherkin
|
|
31
|
-
"""
|
|
32
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
33
|
-
"""
|
|
34
|
-
And the tag model of that feature model
|
|
35
|
-
"""
|
|
36
|
-
@model = @model.tags.first
|
|
37
|
-
"""
|
|
38
|
-
When the tag's source line is requested
|
|
39
|
-
"""
|
|
40
|
-
@model.source_line
|
|
41
|
-
"""
|
|
42
|
-
Then the model returns "1"
|
|
43
|
-
|
|
44
|
-
Scenario: Modeling a tag's source column
|
|
45
|
-
Given the following gherkin:
|
|
46
|
-
"""
|
|
47
|
-
@a_tag
|
|
48
|
-
Feature:
|
|
49
|
-
"""
|
|
50
|
-
And a feature model based on that gherkin
|
|
51
|
-
"""
|
|
52
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
53
|
-
"""
|
|
54
|
-
And the tag model of that feature model
|
|
55
|
-
"""
|
|
56
|
-
@model = @model.tags.first
|
|
57
|
-
"""
|
|
58
|
-
When the tag's source column is requested
|
|
59
|
-
"""
|
|
60
|
-
@model.source_column
|
|
61
|
-
"""
|
|
62
|
-
Then the model returns "1"
|
|
1
|
+
Feature: Tag modeling
|
|
2
|
+
|
|
3
|
+
Tag models represent a tag portion of a feature. They expose several attributes of the tag that they represent.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given the following gherkin:
|
|
8
|
+
"""
|
|
9
|
+
@a_tag
|
|
10
|
+
"""
|
|
11
|
+
And a tag model based on that gherkin
|
|
12
|
+
"""
|
|
13
|
+
@model = CukeModeler::Tag.new(<source_text>)
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Scenario: Modeling a tag's name
|
|
18
|
+
When the tag's name is requested
|
|
19
|
+
"""
|
|
20
|
+
@model.name
|
|
21
|
+
"""
|
|
22
|
+
Then the model returns "@a_tag"
|
|
23
|
+
|
|
24
|
+
Scenario: Modeling a tag's source line
|
|
25
|
+
Given the following gherkin:
|
|
26
|
+
"""
|
|
27
|
+
@a_tag
|
|
28
|
+
Feature:
|
|
29
|
+
"""
|
|
30
|
+
And a feature model based on that gherkin
|
|
31
|
+
"""
|
|
32
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
33
|
+
"""
|
|
34
|
+
And the tag model of that feature model
|
|
35
|
+
"""
|
|
36
|
+
@model = @model.tags.first
|
|
37
|
+
"""
|
|
38
|
+
When the tag's source line is requested
|
|
39
|
+
"""
|
|
40
|
+
@model.source_line
|
|
41
|
+
"""
|
|
42
|
+
Then the model returns "1"
|
|
43
|
+
|
|
44
|
+
Scenario: Modeling a tag's source column
|
|
45
|
+
Given the following gherkin:
|
|
46
|
+
"""
|
|
47
|
+
@a_tag
|
|
48
|
+
Feature:
|
|
49
|
+
"""
|
|
50
|
+
And a feature model based on that gherkin
|
|
51
|
+
"""
|
|
52
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
53
|
+
"""
|
|
54
|
+
And the tag model of that feature model
|
|
55
|
+
"""
|
|
56
|
+
@model = @model.tags.first
|
|
57
|
+
"""
|
|
58
|
+
When the tag's source column is requested
|
|
59
|
+
"""
|
|
60
|
+
@model.source_column
|
|
61
|
+
"""
|
|
62
|
+
Then the model returns "1"
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
Feature: Tag output
|
|
2
|
-
|
|
3
|
-
A tag model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the name of the tag that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the following gherkin:
|
|
9
|
-
"""
|
|
10
|
-
@a_tag
|
|
11
|
-
"""
|
|
12
|
-
And a tag model based on that gherkin
|
|
13
|
-
"""
|
|
14
|
-
@model = CukeModeler::Tag.new(<source_text>)
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Scenario: Stringify a tag model
|
|
19
|
-
When the model is output as a string
|
|
20
|
-
"""
|
|
21
|
-
@model.to_s
|
|
22
|
-
"""
|
|
23
|
-
Then the following text is provided:
|
|
24
|
-
"""
|
|
25
|
-
@a_tag
|
|
26
|
-
"""
|
|
27
|
-
And the output can be used to make an equivalent model
|
|
28
|
-
"""
|
|
29
|
-
CukeModeler::Tag.new(@model.to_s)
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
Scenario: Inspect a tag model
|
|
33
|
-
When the model is inspected
|
|
34
|
-
"""
|
|
35
|
-
@model.inspect
|
|
36
|
-
"""
|
|
37
|
-
Then the following text is provided:
|
|
38
|
-
"""
|
|
39
|
-
#<CukeModeler::Tag:<object_id> @name: "@a_tag">
|
|
40
|
-
"""
|
|
1
|
+
Feature: Tag output
|
|
2
|
+
|
|
3
|
+
A tag model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the name of the tag that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given the following gherkin:
|
|
9
|
+
"""
|
|
10
|
+
@a_tag
|
|
11
|
+
"""
|
|
12
|
+
And a tag model based on that gherkin
|
|
13
|
+
"""
|
|
14
|
+
@model = CukeModeler::Tag.new(<source_text>)
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Scenario: Stringify a tag model
|
|
19
|
+
When the model is output as a string
|
|
20
|
+
"""
|
|
21
|
+
@model.to_s
|
|
22
|
+
"""
|
|
23
|
+
Then the following text is provided:
|
|
24
|
+
"""
|
|
25
|
+
@a_tag
|
|
26
|
+
"""
|
|
27
|
+
And the output can be used to make an equivalent model
|
|
28
|
+
"""
|
|
29
|
+
CukeModeler::Tag.new(@model.to_s)
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
Scenario: Inspect a tag model
|
|
33
|
+
When the model is inspected
|
|
34
|
+
"""
|
|
35
|
+
@model.inspect
|
|
36
|
+
"""
|
|
37
|
+
Then the following text is provided:
|
|
38
|
+
"""
|
|
39
|
+
#<CukeModeler::Tag:<object_id> @name: "@a_tag">
|
|
40
|
+
"""
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cuke_modeler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.29.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Kessler
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: cucumber-gherkin
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "<"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
18
|
+
version: '40.0'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "<"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
25
|
+
version: '40.0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: base64
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -75,7 +74,7 @@ dependencies:
|
|
|
75
74
|
version: 2.2.0
|
|
76
75
|
- - "<"
|
|
77
76
|
- !ruby/object:Gem::Version
|
|
78
|
-
version:
|
|
77
|
+
version: 12.0.0
|
|
79
78
|
type: :development
|
|
80
79
|
prerelease: false
|
|
81
80
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -85,7 +84,7 @@ dependencies:
|
|
|
85
84
|
version: 2.2.0
|
|
86
85
|
- - "<"
|
|
87
86
|
- !ruby/object:Gem::Version
|
|
88
|
-
version:
|
|
87
|
+
version: 12.0.0
|
|
89
88
|
- !ruby/object:Gem::Dependency
|
|
90
89
|
name: rainbow
|
|
91
90
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -244,6 +243,8 @@ files:
|
|
|
244
243
|
- lib/cuke_modeler/adapters/gherkin_35_adapter.rb
|
|
245
244
|
- lib/cuke_modeler/adapters/gherkin_36_adapter.rb
|
|
246
245
|
- lib/cuke_modeler/adapters/gherkin_37_adapter.rb
|
|
246
|
+
- lib/cuke_modeler/adapters/gherkin_38_adapter.rb
|
|
247
|
+
- lib/cuke_modeler/adapters/gherkin_39_adapter.rb
|
|
247
248
|
- lib/cuke_modeler/adapters/gherkin_9_adapter.rb
|
|
248
249
|
- lib/cuke_modeler/adapters/gherkin_base_adapter.rb
|
|
249
250
|
- lib/cuke_modeler/containing.rb
|
|
@@ -315,7 +316,6 @@ metadata:
|
|
|
315
316
|
documentation_uri: https://www.rubydoc.info/gems/cuke_modeler
|
|
316
317
|
source_code_uri: https://github.com/enkessler/cuke_modeler
|
|
317
318
|
rubygems_mfa_required: 'true'
|
|
318
|
-
post_install_message:
|
|
319
319
|
rdoc_options: []
|
|
320
320
|
require_paths:
|
|
321
321
|
- lib
|
|
@@ -333,8 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
333
333
|
- !ruby/object:Gem::Version
|
|
334
334
|
version: '0'
|
|
335
335
|
requirements: []
|
|
336
|
-
rubygems_version:
|
|
337
|
-
signing_key:
|
|
336
|
+
rubygems_version: 4.0.3
|
|
338
337
|
specification_version: 4
|
|
339
338
|
summary: A gem providing functionality to model Gherkin based test suites.
|
|
340
339
|
test_files: []
|