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,87 +1,87 @@
|
|
|
1
|
-
Feature: Outline output
|
|
2
|
-
|
|
3
|
-
An outline model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the name of the outline that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the following gherkin:
|
|
9
|
-
"""
|
|
10
|
-
@tag1@tag2
|
|
11
|
-
@tag3
|
|
12
|
-
Scenario Outline: An outline with everything that it could have
|
|
13
|
-
|
|
14
|
-
Some description.
|
|
15
|
-
Some more description.
|
|
16
|
-
|
|
17
|
-
* a step
|
|
18
|
-
|value|
|
|
19
|
-
* a <value> step
|
|
20
|
-
\"\"\"
|
|
21
|
-
some string
|
|
22
|
-
\"\"\"
|
|
23
|
-
|
|
24
|
-
Examples:
|
|
25
|
-
Some description.
|
|
26
|
-
Some more description.
|
|
27
|
-
| value |
|
|
28
|
-
| x |
|
|
29
|
-
@example_tag
|
|
30
|
-
|
|
31
|
-
Examples:
|
|
32
|
-
| value |
|
|
33
|
-
| y |
|
|
34
|
-
"""
|
|
35
|
-
And an outline model based on that gherkin
|
|
36
|
-
"""
|
|
37
|
-
@model = CukeModeler::Outline.new(<source_text>)
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Scenario: Stringify an outline model
|
|
42
|
-
When the model is output as a string
|
|
43
|
-
"""
|
|
44
|
-
@model.to_s
|
|
45
|
-
"""
|
|
46
|
-
Then the following text is provided:
|
|
47
|
-
"""
|
|
48
|
-
@tag1 @tag2 @tag3
|
|
49
|
-
Scenario Outline: An outline with everything that it could have
|
|
50
|
-
|
|
51
|
-
Some description.
|
|
52
|
-
Some more description.
|
|
53
|
-
|
|
54
|
-
* a step
|
|
55
|
-
| value |
|
|
56
|
-
* a <value> step
|
|
57
|
-
\"\"\"
|
|
58
|
-
some string
|
|
59
|
-
\"\"\"
|
|
60
|
-
|
|
61
|
-
Examples:
|
|
62
|
-
|
|
63
|
-
Some description.
|
|
64
|
-
Some more description.
|
|
65
|
-
|
|
66
|
-
| value |
|
|
67
|
-
| x |
|
|
68
|
-
|
|
69
|
-
@example_tag
|
|
70
|
-
Examples:
|
|
71
|
-
| value |
|
|
72
|
-
| y |
|
|
73
|
-
"""
|
|
74
|
-
And the output can be used to make an equivalent model
|
|
75
|
-
"""
|
|
76
|
-
CukeModeler::Outline.new(@model.to_s)
|
|
77
|
-
"""
|
|
78
|
-
|
|
79
|
-
Scenario: Inspect an outline model
|
|
80
|
-
When the model is inspected
|
|
81
|
-
"""
|
|
82
|
-
@model.inspect
|
|
83
|
-
"""
|
|
84
|
-
Then the following text is provided:
|
|
85
|
-
"""
|
|
86
|
-
#<CukeModeler::Outline:<object_id> @name: "An outline with everything that it could have">
|
|
87
|
-
"""
|
|
1
|
+
Feature: Outline output
|
|
2
|
+
|
|
3
|
+
An outline model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the name of the outline that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given the following gherkin:
|
|
9
|
+
"""
|
|
10
|
+
@tag1@tag2
|
|
11
|
+
@tag3
|
|
12
|
+
Scenario Outline: An outline with everything that it could have
|
|
13
|
+
|
|
14
|
+
Some description.
|
|
15
|
+
Some more description.
|
|
16
|
+
|
|
17
|
+
* a step
|
|
18
|
+
|value|
|
|
19
|
+
* a <value> step
|
|
20
|
+
\"\"\"
|
|
21
|
+
some string
|
|
22
|
+
\"\"\"
|
|
23
|
+
|
|
24
|
+
Examples:
|
|
25
|
+
Some description.
|
|
26
|
+
Some more description.
|
|
27
|
+
| value |
|
|
28
|
+
| x |
|
|
29
|
+
@example_tag
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
| value |
|
|
33
|
+
| y |
|
|
34
|
+
"""
|
|
35
|
+
And an outline model based on that gherkin
|
|
36
|
+
"""
|
|
37
|
+
@model = CukeModeler::Outline.new(<source_text>)
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
Scenario: Stringify an outline model
|
|
42
|
+
When the model is output as a string
|
|
43
|
+
"""
|
|
44
|
+
@model.to_s
|
|
45
|
+
"""
|
|
46
|
+
Then the following text is provided:
|
|
47
|
+
"""
|
|
48
|
+
@tag1 @tag2 @tag3
|
|
49
|
+
Scenario Outline: An outline with everything that it could have
|
|
50
|
+
|
|
51
|
+
Some description.
|
|
52
|
+
Some more description.
|
|
53
|
+
|
|
54
|
+
* a step
|
|
55
|
+
| value |
|
|
56
|
+
* a <value> step
|
|
57
|
+
\"\"\"
|
|
58
|
+
some string
|
|
59
|
+
\"\"\"
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
|
|
63
|
+
Some description.
|
|
64
|
+
Some more description.
|
|
65
|
+
|
|
66
|
+
| value |
|
|
67
|
+
| x |
|
|
68
|
+
|
|
69
|
+
@example_tag
|
|
70
|
+
Examples:
|
|
71
|
+
| value |
|
|
72
|
+
| y |
|
|
73
|
+
"""
|
|
74
|
+
And the output can be used to make an equivalent model
|
|
75
|
+
"""
|
|
76
|
+
CukeModeler::Outline.new(@model.to_s)
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
Scenario: Inspect an outline model
|
|
80
|
+
When the model is inspected
|
|
81
|
+
"""
|
|
82
|
+
@model.inspect
|
|
83
|
+
"""
|
|
84
|
+
Then the following text is provided:
|
|
85
|
+
"""
|
|
86
|
+
#<CukeModeler::Outline:<object_id> @name: "An outline with everything that it could have">
|
|
87
|
+
"""
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
Feature: Row modeling
|
|
2
|
-
|
|
3
|
-
Row models represent an individual row in a step or example table. They expose several attributes of the row that they represent.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Background:
|
|
7
|
-
Given the following gherkin:
|
|
8
|
-
"""
|
|
9
|
-
| foo | bar |
|
|
10
|
-
"""
|
|
11
|
-
And a row model based on that gherkin
|
|
12
|
-
"""
|
|
13
|
-
@model = CukeModeler::Row.new(<source_text>)
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Scenario: Modeling a rows's cells
|
|
18
|
-
When the rows's cells are requested
|
|
19
|
-
"""
|
|
20
|
-
@model.cells
|
|
21
|
-
"""
|
|
22
|
-
Then the model returns models for the following cells:
|
|
23
|
-
| foo |
|
|
24
|
-
| bar |
|
|
25
|
-
|
|
26
|
-
Scenario: Modeling a row's source line
|
|
27
|
-
Given the following gherkin:
|
|
28
|
-
"""
|
|
29
|
-
Feature:
|
|
30
|
-
|
|
31
|
-
Scenario:
|
|
32
|
-
* a step
|
|
33
|
-
| foo |
|
|
34
|
-
"""
|
|
35
|
-
And a feature model based on that gherkin
|
|
36
|
-
"""
|
|
37
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
38
|
-
"""
|
|
39
|
-
And the row model inside of that feature model
|
|
40
|
-
"""
|
|
41
|
-
@model = @model.tests.first.steps.first.block.rows.first
|
|
42
|
-
"""
|
|
43
|
-
When the rows's source line is requested
|
|
44
|
-
"""
|
|
45
|
-
@model.source_line
|
|
46
|
-
"""
|
|
47
|
-
Then the model returns "5"
|
|
48
|
-
|
|
49
|
-
Scenario: Modeling a row's source column
|
|
50
|
-
Given the following gherkin:
|
|
51
|
-
"""
|
|
52
|
-
Feature:
|
|
53
|
-
|
|
54
|
-
Scenario:
|
|
55
|
-
* a step
|
|
56
|
-
| foo |
|
|
57
|
-
"""
|
|
58
|
-
And a feature model based on that gherkin
|
|
59
|
-
"""
|
|
60
|
-
@model = CukeModeler::Feature.new(<source_text>)
|
|
61
|
-
"""
|
|
62
|
-
And the row model inside of that feature model
|
|
63
|
-
"""
|
|
64
|
-
@model = @model.tests.first.steps.first.block.rows.first
|
|
65
|
-
"""
|
|
66
|
-
When the rows's source column is requested
|
|
67
|
-
"""
|
|
68
|
-
@model.source_column
|
|
69
|
-
"""
|
|
70
|
-
Then the model returns "7"
|
|
1
|
+
Feature: Row modeling
|
|
2
|
+
|
|
3
|
+
Row models represent an individual row in a step or example table. They expose several attributes of the row that they represent.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given the following gherkin:
|
|
8
|
+
"""
|
|
9
|
+
| foo | bar |
|
|
10
|
+
"""
|
|
11
|
+
And a row model based on that gherkin
|
|
12
|
+
"""
|
|
13
|
+
@model = CukeModeler::Row.new(<source_text>)
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Scenario: Modeling a rows's cells
|
|
18
|
+
When the rows's cells are requested
|
|
19
|
+
"""
|
|
20
|
+
@model.cells
|
|
21
|
+
"""
|
|
22
|
+
Then the model returns models for the following cells:
|
|
23
|
+
| foo |
|
|
24
|
+
| bar |
|
|
25
|
+
|
|
26
|
+
Scenario: Modeling a row's source line
|
|
27
|
+
Given the following gherkin:
|
|
28
|
+
"""
|
|
29
|
+
Feature:
|
|
30
|
+
|
|
31
|
+
Scenario:
|
|
32
|
+
* a step
|
|
33
|
+
| foo |
|
|
34
|
+
"""
|
|
35
|
+
And a feature model based on that gherkin
|
|
36
|
+
"""
|
|
37
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
38
|
+
"""
|
|
39
|
+
And the row model inside of that feature model
|
|
40
|
+
"""
|
|
41
|
+
@model = @model.tests.first.steps.first.block.rows.first
|
|
42
|
+
"""
|
|
43
|
+
When the rows's source line is requested
|
|
44
|
+
"""
|
|
45
|
+
@model.source_line
|
|
46
|
+
"""
|
|
47
|
+
Then the model returns "5"
|
|
48
|
+
|
|
49
|
+
Scenario: Modeling a row's source column
|
|
50
|
+
Given the following gherkin:
|
|
51
|
+
"""
|
|
52
|
+
Feature:
|
|
53
|
+
|
|
54
|
+
Scenario:
|
|
55
|
+
* a step
|
|
56
|
+
| foo |
|
|
57
|
+
"""
|
|
58
|
+
And a feature model based on that gherkin
|
|
59
|
+
"""
|
|
60
|
+
@model = CukeModeler::Feature.new(<source_text>)
|
|
61
|
+
"""
|
|
62
|
+
And the row model inside of that feature model
|
|
63
|
+
"""
|
|
64
|
+
@model = @model.tests.first.steps.first.block.rows.first
|
|
65
|
+
"""
|
|
66
|
+
When the rows's source column is requested
|
|
67
|
+
"""
|
|
68
|
+
@model.source_column
|
|
69
|
+
"""
|
|
70
|
+
Then the model returns "7"
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
Feature: Row output
|
|
2
|
-
|
|
3
|
-
A row model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
-
inspection is the collection of cells of the row that it models.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the following gherkin:
|
|
9
|
-
"""
|
|
10
|
-
|foo|bar|
|
|
11
|
-
"""
|
|
12
|
-
And a row model based on that gherkin
|
|
13
|
-
"""
|
|
14
|
-
@model = CukeModeler::Row.new(<source_text>)
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Scenario: Stringify a row 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
|
-
| foo | bar |
|
|
26
|
-
"""
|
|
27
|
-
And the output can be used to make an equivalent model
|
|
28
|
-
"""
|
|
29
|
-
CukeModeler::Row.new(@model.to_s)
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
Scenario: Inspect a row model
|
|
33
|
-
When the model is inspected
|
|
34
|
-
"""
|
|
35
|
-
@model.inspect
|
|
36
|
-
"""
|
|
37
|
-
Then the following text is provided:
|
|
38
|
-
"""
|
|
39
|
-
#<CukeModeler::Row:<object_id> @cells: ["foo", "bar"]>
|
|
40
|
-
"""
|
|
1
|
+
Feature: Row output
|
|
2
|
+
|
|
3
|
+
A row model's string output is a Gherkin representation of itself and its most relevant attribute for
|
|
4
|
+
inspection is the collection of cells of the row that it models.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given the following gherkin:
|
|
9
|
+
"""
|
|
10
|
+
|foo|bar|
|
|
11
|
+
"""
|
|
12
|
+
And a row model based on that gherkin
|
|
13
|
+
"""
|
|
14
|
+
@model = CukeModeler::Row.new(<source_text>)
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Scenario: Stringify a row 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
|
+
| foo | bar |
|
|
26
|
+
"""
|
|
27
|
+
And the output can be used to make an equivalent model
|
|
28
|
+
"""
|
|
29
|
+
CukeModeler::Row.new(@model.to_s)
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
Scenario: Inspect a row model
|
|
33
|
+
When the model is inspected
|
|
34
|
+
"""
|
|
35
|
+
@model.inspect
|
|
36
|
+
"""
|
|
37
|
+
Then the following text is provided:
|
|
38
|
+
"""
|
|
39
|
+
#<CukeModeler::Row:<object_id> @cells: ["foo", "bar"]>
|
|
40
|
+
"""
|