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.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +579 -572
  3. data/LICENSE.txt +22 -22
  4. data/README.md +135 -135
  5. data/cuke_modeler.gemspec +59 -59
  6. data/lib/cuke_modeler/adapters/gherkin_10_adapter.rb +13 -13
  7. data/lib/cuke_modeler/adapters/gherkin_11_adapter.rb +13 -13
  8. data/lib/cuke_modeler/adapters/gherkin_12_adapter.rb +13 -13
  9. data/lib/cuke_modeler/adapters/gherkin_13_adapter.rb +13 -13
  10. data/lib/cuke_modeler/adapters/gherkin_14_adapter.rb +13 -13
  11. data/lib/cuke_modeler/adapters/gherkin_15_adapter.rb +13 -13
  12. data/lib/cuke_modeler/adapters/gherkin_16_adapter.rb +13 -13
  13. data/lib/cuke_modeler/adapters/gherkin_17_adapter.rb +13 -13
  14. data/lib/cuke_modeler/adapters/gherkin_18_adapter.rb +27 -27
  15. data/lib/cuke_modeler/adapters/gherkin_19_adapter.rb +64 -64
  16. data/lib/cuke_modeler/adapters/gherkin_20_adapter.rb +359 -359
  17. data/lib/cuke_modeler/adapters/gherkin_21_adapter.rb +13 -13
  18. data/lib/cuke_modeler/adapters/gherkin_22_adapter.rb +13 -13
  19. data/lib/cuke_modeler/adapters/gherkin_23_adapter.rb +13 -13
  20. data/lib/cuke_modeler/adapters/gherkin_24_adapter.rb +13 -13
  21. data/lib/cuke_modeler/adapters/gherkin_25_adapter.rb +13 -13
  22. data/lib/cuke_modeler/adapters/gherkin_26_adapter.rb +13 -13
  23. data/lib/cuke_modeler/adapters/gherkin_27_adapter.rb +13 -13
  24. data/lib/cuke_modeler/adapters/gherkin_28_adapter.rb +13 -13
  25. data/lib/cuke_modeler/adapters/gherkin_29_adapter.rb +13 -13
  26. data/lib/cuke_modeler/adapters/gherkin_30_adapter.rb +13 -13
  27. data/lib/cuke_modeler/adapters/gherkin_31_adapter.rb +13 -13
  28. data/lib/cuke_modeler/adapters/gherkin_32_adapter.rb +13 -13
  29. data/lib/cuke_modeler/adapters/gherkin_33_adapter.rb +13 -13
  30. data/lib/cuke_modeler/adapters/gherkin_34_adapter.rb +13 -13
  31. data/lib/cuke_modeler/adapters/gherkin_35_adapter.rb +13 -13
  32. data/lib/cuke_modeler/adapters/gherkin_36_adapter.rb +13 -13
  33. data/lib/cuke_modeler/adapters/gherkin_37_adapter.rb +13 -13
  34. data/lib/cuke_modeler/adapters/gherkin_38_adapter.rb +13 -0
  35. data/lib/cuke_modeler/adapters/gherkin_9_adapter.rb +375 -375
  36. data/lib/cuke_modeler/adapters/gherkin_base_adapter.rb +17 -17
  37. data/lib/cuke_modeler/containing.rb +105 -105
  38. data/lib/cuke_modeler/described.rb +71 -71
  39. data/lib/cuke_modeler/models/background.rb +122 -122
  40. data/lib/cuke_modeler/models/cell.rb +88 -88
  41. data/lib/cuke_modeler/models/comment.rb +82 -82
  42. data/lib/cuke_modeler/models/directory.rb +143 -143
  43. data/lib/cuke_modeler/models/doc_string.rb +104 -104
  44. data/lib/cuke_modeler/models/example.rb +274 -274
  45. data/lib/cuke_modeler/models/feature.rb +200 -200
  46. data/lib/cuke_modeler/models/feature_file.rb +116 -116
  47. data/lib/cuke_modeler/models/model.rb +87 -87
  48. data/lib/cuke_modeler/models/outline.rb +145 -145
  49. data/lib/cuke_modeler/models/row.rb +104 -104
  50. data/lib/cuke_modeler/models/rule.rb +162 -162
  51. data/lib/cuke_modeler/models/scenario.rb +128 -128
  52. data/lib/cuke_modeler/models/step.rb +178 -178
  53. data/lib/cuke_modeler/models/table.rb +117 -117
  54. data/lib/cuke_modeler/models/tag.rb +75 -75
  55. data/lib/cuke_modeler/named.rb +26 -26
  56. data/lib/cuke_modeler/nested.rb +61 -61
  57. data/lib/cuke_modeler/parsed.rb +24 -24
  58. data/lib/cuke_modeler/parsing.rb +208 -208
  59. data/lib/cuke_modeler/sourceable.rb +29 -29
  60. data/lib/cuke_modeler/stepped.rb +34 -34
  61. data/lib/cuke_modeler/taggable.rb +57 -57
  62. data/lib/cuke_modeler/version.rb +4 -4
  63. data/lib/cuke_modeler.rb +32 -32
  64. data/testing/cucumber/features/analysis/step_comparison.feature +25 -25
  65. data/testing/cucumber/features/analysis/test_comparison.feature +35 -35
  66. data/testing/cucumber/features/modeling/background_modeling.feature +105 -105
  67. data/testing/cucumber/features/modeling/background_output.feature +60 -60
  68. data/testing/cucumber/features/modeling/cell_modeling.feature +68 -68
  69. data/testing/cucumber/features/modeling/cell_output.feature +36 -36
  70. data/testing/cucumber/features/modeling/comment_modeling.feature +62 -62
  71. data/testing/cucumber/features/modeling/comment_output.feature +40 -40
  72. data/testing/cucumber/features/modeling/directory_modeling.feature +62 -62
  73. data/testing/cucumber/features/modeling/directory_output.feature +33 -33
  74. data/testing/cucumber/features/modeling/doc_string_modeling.feature +85 -85
  75. data/testing/cucumber/features/modeling/doc_string_output.feature +50 -50
  76. data/testing/cucumber/features/modeling/example_modeling.feature +155 -155
  77. data/testing/cucumber/features/modeling/example_output.feature +57 -57
  78. data/testing/cucumber/features/modeling/feature_file_modeling.feature +49 -49
  79. data/testing/cucumber/features/modeling/feature_file_output.feature +33 -33
  80. data/testing/cucumber/features/modeling/feature_modeling.feature +149 -149
  81. data/testing/cucumber/features/modeling/feature_output.feature +144 -144
  82. data/testing/cucumber/features/modeling/model_output.feature +61 -61
  83. data/testing/cucumber/features/modeling/model_structure.feature +42 -42
  84. data/testing/cucumber/features/modeling/outline_modeling.feature +175 -175
  85. data/testing/cucumber/features/modeling/outline_output.feature +87 -87
  86. data/testing/cucumber/features/modeling/row_modeling.feature +70 -70
  87. data/testing/cucumber/features/modeling/row_output.feature +40 -40
  88. data/testing/cucumber/features/modeling/rule_modeling.feature +171 -171
  89. data/testing/cucumber/features/modeling/rule_output.feature +136 -136
  90. data/testing/cucumber/features/modeling/scenario_modeling.feature +146 -146
  91. data/testing/cucumber/features/modeling/scenario_output.feature +63 -63
  92. data/testing/cucumber/features/modeling/step_modeling.feature +105 -105
  93. data/testing/cucumber/features/modeling/step_output.feature +47 -47
  94. data/testing/cucumber/features/modeling/table_modeling.feature +73 -73
  95. data/testing/cucumber/features/modeling/table_output.feature +42 -42
  96. data/testing/cucumber/features/modeling/tag_modeling.feature +62 -62
  97. data/testing/cucumber/features/modeling/tag_output.feature +40 -40
  98. metadata +6 -8
@@ -1,146 +1,146 @@
1
- Feature: Scenario modeling
2
-
3
- Scenario models represent a Scenario portion of a feature. They expose several attributes of the scenario that they represent, as well as containing models for the steps and tags that are present in that scenario.
4
-
5
-
6
- Background:
7
- Given the following gherkin:
8
- """
9
- Scenario: example scenario
10
-
11
- Some background description.
12
-
13
- Some more.
14
- Even more.
15
-
16
- Given a setup step
17
- When an action step
18
- Then a verification step
19
- """
20
- And a scenario model based on that gherkin
21
- """
22
- @model = CukeModeler::Scenario.new(<source_text>)
23
- """
24
-
25
-
26
- Scenario: Modeling a scenario's keyword
27
- When the scenario's keyword is requested
28
- """
29
- @model.keyword
30
- """
31
- Then the model returns "Scenario"
32
-
33
- Scenario: Modeling a scenario's name
34
- When the scenario's name is requested
35
- """
36
- @model.name
37
- """
38
- Then the model returns "example scenario"
39
-
40
- Scenario: Modeling a scenario's description
41
- When the scenario's description is requested
42
- """
43
- @model.description
44
- """
45
- Then the model returns
46
- """
47
- Some background description.
48
-
49
- Some more.
50
- Even more.
51
- """
52
-
53
- Scenario: Modeling a scenario's steps
54
- When the scenario's steps are requested
55
- """
56
- @model.steps
57
- """
58
- Then the model returns models for the following steps:
59
- | a setup step |
60
- | an action step |
61
- | a verification step |
62
-
63
- Scenario: Modeling a scenario's tags
64
- Given the following gherkin:
65
- """
66
- @feature_tag
67
- Feature:
68
-
69
- @scenario_tag_1
70
- @scenario_tag_2
71
- Scenario:
72
- * a step
73
- """
74
- And a feature model based on that gherkin
75
- """
76
- @model = CukeModeler::Feature.new(<source_text>)
77
- """
78
- And the scenario model of that feature model
79
- """
80
- @model = @model.scenarios.first
81
- """
82
- When the scenario's tags are requested
83
- """
84
- @model.tags
85
- """
86
- Then the model returns models for the following tags:
87
- | @scenario_tag_1 |
88
- | @scenario_tag_2 |
89
- When the scenario's inherited tags are requested
90
- """
91
- @model.applied_tags
92
- """
93
- Then the model returns models for the following tags:
94
- | @feature_tag |
95
- When all of the scenario's tags are requested
96
- """
97
- @model.all_tags
98
- """
99
- Then the model returns models for the following tags:
100
- | @feature_tag |
101
- | @scenario_tag_1 |
102
- | @scenario_tag_2 |
103
-
104
- Scenario: Modeling a scenario's source line
105
- Given the following gherkin:
106
- """
107
- Feature:
108
-
109
- Scenario:
110
- * a step
111
- """
112
- And a feature model based on that gherkin
113
- """
114
- @model = CukeModeler::Feature.new(<source_text>)
115
- """
116
- And the scenario model of that feature model
117
- """
118
- @model = @model.scenarios.first
119
- """
120
- When the scenario's source line is requested
121
- """
122
- @model.source_line
123
- """
124
- Then the model returns "3"
125
-
126
- Scenario: Modeling a scenario's source column
127
- Given the following gherkin:
128
- """
129
- Feature:
130
-
131
- Scenario:
132
- * a step
133
- """
134
- And a feature model based on that gherkin
135
- """
136
- @model = CukeModeler::Feature.new(<source_text>)
137
- """
138
- And the scenario model of that feature model
139
- """
140
- @model = @model.scenarios.first
141
- """
142
- When the scenario's source column is requested
143
- """
144
- @model.source_column
145
- """
146
- Then the model returns "3"
1
+ Feature: Scenario modeling
2
+
3
+ Scenario models represent a Scenario portion of a feature. They expose several attributes of the scenario that they represent, as well as containing models for the steps and tags that are present in that scenario.
4
+
5
+
6
+ Background:
7
+ Given the following gherkin:
8
+ """
9
+ Scenario: example scenario
10
+
11
+ Some background description.
12
+
13
+ Some more.
14
+ Even more.
15
+
16
+ Given a setup step
17
+ When an action step
18
+ Then a verification step
19
+ """
20
+ And a scenario model based on that gherkin
21
+ """
22
+ @model = CukeModeler::Scenario.new(<source_text>)
23
+ """
24
+
25
+
26
+ Scenario: Modeling a scenario's keyword
27
+ When the scenario's keyword is requested
28
+ """
29
+ @model.keyword
30
+ """
31
+ Then the model returns "Scenario"
32
+
33
+ Scenario: Modeling a scenario's name
34
+ When the scenario's name is requested
35
+ """
36
+ @model.name
37
+ """
38
+ Then the model returns "example scenario"
39
+
40
+ Scenario: Modeling a scenario's description
41
+ When the scenario's description is requested
42
+ """
43
+ @model.description
44
+ """
45
+ Then the model returns
46
+ """
47
+ Some background description.
48
+
49
+ Some more.
50
+ Even more.
51
+ """
52
+
53
+ Scenario: Modeling a scenario's steps
54
+ When the scenario's steps are requested
55
+ """
56
+ @model.steps
57
+ """
58
+ Then the model returns models for the following steps:
59
+ | a setup step |
60
+ | an action step |
61
+ | a verification step |
62
+
63
+ Scenario: Modeling a scenario's tags
64
+ Given the following gherkin:
65
+ """
66
+ @feature_tag
67
+ Feature:
68
+
69
+ @scenario_tag_1
70
+ @scenario_tag_2
71
+ Scenario:
72
+ * a step
73
+ """
74
+ And a feature model based on that gherkin
75
+ """
76
+ @model = CukeModeler::Feature.new(<source_text>)
77
+ """
78
+ And the scenario model of that feature model
79
+ """
80
+ @model = @model.scenarios.first
81
+ """
82
+ When the scenario's tags are requested
83
+ """
84
+ @model.tags
85
+ """
86
+ Then the model returns models for the following tags:
87
+ | @scenario_tag_1 |
88
+ | @scenario_tag_2 |
89
+ When the scenario's inherited tags are requested
90
+ """
91
+ @model.applied_tags
92
+ """
93
+ Then the model returns models for the following tags:
94
+ | @feature_tag |
95
+ When all of the scenario's tags are requested
96
+ """
97
+ @model.all_tags
98
+ """
99
+ Then the model returns models for the following tags:
100
+ | @feature_tag |
101
+ | @scenario_tag_1 |
102
+ | @scenario_tag_2 |
103
+
104
+ Scenario: Modeling a scenario's source line
105
+ Given the following gherkin:
106
+ """
107
+ Feature:
108
+
109
+ Scenario:
110
+ * a step
111
+ """
112
+ And a feature model based on that gherkin
113
+ """
114
+ @model = CukeModeler::Feature.new(<source_text>)
115
+ """
116
+ And the scenario model of that feature model
117
+ """
118
+ @model = @model.scenarios.first
119
+ """
120
+ When the scenario's source line is requested
121
+ """
122
+ @model.source_line
123
+ """
124
+ Then the model returns "3"
125
+
126
+ Scenario: Modeling a scenario's source column
127
+ Given the following gherkin:
128
+ """
129
+ Feature:
130
+
131
+ Scenario:
132
+ * a step
133
+ """
134
+ And a feature model based on that gherkin
135
+ """
136
+ @model = CukeModeler::Feature.new(<source_text>)
137
+ """
138
+ And the scenario model of that feature model
139
+ """
140
+ @model = @model.scenarios.first
141
+ """
142
+ When the scenario's source column is requested
143
+ """
144
+ @model.source_column
145
+ """
146
+ Then the model returns "3"
@@ -1,63 +1,63 @@
1
- Feature: Scenario output
2
-
3
- A scenario model's string output is a Gherkin representation of itself and its most relevant attribute for
4
- inspection is the name of the scenario that it models.
5
-
6
-
7
- Background:
8
- Given the following gherkin:
9
- """
10
- @tag1@tag2
11
- @tag3
12
- Scenario: A scenario with everything that it could have
13
-
14
- Including a description
15
- and then some.
16
-
17
- * a step
18
- |value|
19
- * another step
20
- \"\"\"
21
- some string
22
- \"\"\"
23
- """
24
- And a scenario model based on that gherkin
25
- """
26
- @model = CukeModeler::Scenario.new(<source_text>)
27
- """
28
-
29
-
30
- Scenario: Stringify a scenario model
31
- When the model is output as a string
32
- """
33
- @model.to_s
34
- """
35
- Then the following text is provided:
36
- """
37
- @tag1 @tag2 @tag3
38
- Scenario: A scenario with everything that it could have
39
-
40
- Including a description
41
- and then some.
42
-
43
- * a step
44
- | value |
45
- * another step
46
- \"\"\"
47
- some string
48
- \"\"\"
49
- """
50
- And the output can be used to make an equivalent model
51
- """
52
- CukeModeler::Scenario.new(@model.to_s)
53
- """
54
-
55
- Scenario: Inspect a scenario model
56
- When the model is inspected
57
- """
58
- @model.inspect
59
- """
60
- Then the following text is provided:
61
- """
62
- #<CukeModeler::Scenario:<object_id> @name: "A scenario with everything that it could have">
63
- """
1
+ Feature: Scenario output
2
+
3
+ A scenario model's string output is a Gherkin representation of itself and its most relevant attribute for
4
+ inspection is the name of the scenario that it models.
5
+
6
+
7
+ Background:
8
+ Given the following gherkin:
9
+ """
10
+ @tag1@tag2
11
+ @tag3
12
+ Scenario: A scenario with everything that it could have
13
+
14
+ Including a description
15
+ and then some.
16
+
17
+ * a step
18
+ |value|
19
+ * another step
20
+ \"\"\"
21
+ some string
22
+ \"\"\"
23
+ """
24
+ And a scenario model based on that gherkin
25
+ """
26
+ @model = CukeModeler::Scenario.new(<source_text>)
27
+ """
28
+
29
+
30
+ Scenario: Stringify a scenario model
31
+ When the model is output as a string
32
+ """
33
+ @model.to_s
34
+ """
35
+ Then the following text is provided:
36
+ """
37
+ @tag1 @tag2 @tag3
38
+ Scenario: A scenario with everything that it could have
39
+
40
+ Including a description
41
+ and then some.
42
+
43
+ * a step
44
+ | value |
45
+ * another step
46
+ \"\"\"
47
+ some string
48
+ \"\"\"
49
+ """
50
+ And the output can be used to make an equivalent model
51
+ """
52
+ CukeModeler::Scenario.new(@model.to_s)
53
+ """
54
+
55
+ Scenario: Inspect a scenario model
56
+ When the model is inspected
57
+ """
58
+ @model.inspect
59
+ """
60
+ Then the following text is provided:
61
+ """
62
+ #<CukeModeler::Scenario:<object_id> @name: "A scenario with everything that it could have">
63
+ """
@@ -1,105 +1,105 @@
1
- Feature: Step modeling
2
-
3
- Step models represent represent the a step in a scenario, outline, or background. They expose several attributes of the step that they represent.
4
-
5
-
6
- Background:
7
- Given the following gherkin:
8
- """
9
- * a step
10
- """
11
- And a step model based on that gherkin
12
- """
13
- @model = CukeModeler::Step.new(<source_text>)
14
- """
15
-
16
-
17
- Scenario: Modeling a step's keyword
18
- When the step's keyword is requested
19
- """
20
- @model.keyword
21
- """
22
- Then the model returns "*"
23
-
24
- Scenario: Modeling a step's base text
25
- When the step's base text is requested
26
- """
27
- @model.text
28
- """
29
- Then the model returns "a step"
30
-
31
- Scenario: Modeling a step's source line
32
- Given the following gherkin:
33
- """
34
- Feature:
35
-
36
- Scenario:
37
- * a step
38
- """
39
- And a feature model based on that gherkin
40
- """
41
- @model = CukeModeler::Feature.new(<source_text>)
42
- """
43
- And the step model inside of that feature model
44
- """
45
- @model = @model.tests.first.steps.first
46
- """
47
- When the step's source line is requested
48
- """
49
- @model.source_line
50
- """
51
- Then the model returns "4"
52
-
53
- Scenario: Modeling a step's source column
54
- Given the following gherkin:
55
- """
56
- Feature:
57
-
58
- Scenario:
59
- * a step
60
- """
61
- And a feature model based on that gherkin
62
- """
63
- @model = CukeModeler::Feature.new(<source_text>)
64
- """
65
- And the step model inside of that feature model
66
- """
67
- @model = @model.tests.first.steps.first
68
- """
69
- When the step's source column is requested
70
- """
71
- @model.source_column
72
- """
73
- Then the model returns "5"
74
-
75
- Scenario: Modeling a step's table
76
- Given a step model based on the following gherkin:
77
- """
78
- * a step
79
- | value 1 |
80
- | value 2 |
81
- """
82
- When the step's table is requested
83
- """
84
- @model.block
85
- """
86
- Then the model returns a model for the following table:
87
- | value 1 |
88
- | value 2 |
89
-
90
- Scenario: Modeling a step's doc string
91
- Given a step model based on the following gherkin:
92
- """
93
- * a step
94
- \"\"\"
95
- some text
96
- \"\"\"
97
- """
98
- When the step's doc string is requested
99
- """
100
- @model.block
101
- """
102
- Then the model returns a model for the following doc string:
103
- """
104
- some text
105
- """
1
+ Feature: Step modeling
2
+
3
+ Step models represent represent the a step in a scenario, outline, or background. They expose several attributes of the step that they represent.
4
+
5
+
6
+ Background:
7
+ Given the following gherkin:
8
+ """
9
+ * a step
10
+ """
11
+ And a step model based on that gherkin
12
+ """
13
+ @model = CukeModeler::Step.new(<source_text>)
14
+ """
15
+
16
+
17
+ Scenario: Modeling a step's keyword
18
+ When the step's keyword is requested
19
+ """
20
+ @model.keyword
21
+ """
22
+ Then the model returns "*"
23
+
24
+ Scenario: Modeling a step's base text
25
+ When the step's base text is requested
26
+ """
27
+ @model.text
28
+ """
29
+ Then the model returns "a step"
30
+
31
+ Scenario: Modeling a step's source line
32
+ Given the following gherkin:
33
+ """
34
+ Feature:
35
+
36
+ Scenario:
37
+ * a step
38
+ """
39
+ And a feature model based on that gherkin
40
+ """
41
+ @model = CukeModeler::Feature.new(<source_text>)
42
+ """
43
+ And the step model inside of that feature model
44
+ """
45
+ @model = @model.tests.first.steps.first
46
+ """
47
+ When the step's source line is requested
48
+ """
49
+ @model.source_line
50
+ """
51
+ Then the model returns "4"
52
+
53
+ Scenario: Modeling a step's source column
54
+ Given the following gherkin:
55
+ """
56
+ Feature:
57
+
58
+ Scenario:
59
+ * a step
60
+ """
61
+ And a feature model based on that gherkin
62
+ """
63
+ @model = CukeModeler::Feature.new(<source_text>)
64
+ """
65
+ And the step model inside of that feature model
66
+ """
67
+ @model = @model.tests.first.steps.first
68
+ """
69
+ When the step's source column is requested
70
+ """
71
+ @model.source_column
72
+ """
73
+ Then the model returns "5"
74
+
75
+ Scenario: Modeling a step's table
76
+ Given a step model based on the following gherkin:
77
+ """
78
+ * a step
79
+ | value 1 |
80
+ | value 2 |
81
+ """
82
+ When the step's table is requested
83
+ """
84
+ @model.block
85
+ """
86
+ Then the model returns a model for the following table:
87
+ | value 1 |
88
+ | value 2 |
89
+
90
+ Scenario: Modeling a step's doc string
91
+ Given a step model based on the following gherkin:
92
+ """
93
+ * a step
94
+ \"\"\"
95
+ some text
96
+ \"\"\"
97
+ """
98
+ When the step's doc string is requested
99
+ """
100
+ @model.block
101
+ """
102
+ Then the model returns a model for the following doc string:
103
+ """
104
+ some text
105
+ """