cucumber 3.1.2 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1780 -1146
  3. data/CONTRIBUTING.md +224 -61
  4. data/README.md +144 -22
  5. data/bin/cucumber +1 -1
  6. data/lib/autotest/cucumber_mixin.rb +46 -53
  7. data/lib/cucumber/cli/configuration.rb +28 -6
  8. data/lib/cucumber/cli/main.rb +12 -12
  9. data/lib/cucumber/cli/options.rb +103 -77
  10. data/lib/cucumber/cli/profile_loader.rb +49 -26
  11. data/lib/cucumber/configuration.rb +44 -29
  12. data/lib/cucumber/constantize.rb +2 -5
  13. data/lib/cucumber/deprecate.rb +31 -7
  14. data/lib/cucumber/errors.rb +5 -7
  15. data/lib/cucumber/events/envelope.rb +9 -0
  16. data/lib/cucumber/events/gherkin_source_parsed.rb +11 -0
  17. data/lib/cucumber/events/hook_test_step_created.rb +13 -0
  18. data/lib/cucumber/events/step_activated.rb +2 -1
  19. data/lib/cucumber/events/test_case_created.rb +13 -0
  20. data/lib/cucumber/events/test_case_ready.rb +12 -0
  21. data/lib/cucumber/events/test_step_created.rb +13 -0
  22. data/lib/cucumber/events/undefined_parameter_type.rb +10 -0
  23. data/lib/cucumber/events.rb +14 -7
  24. data/lib/cucumber/file_specs.rb +6 -6
  25. data/lib/cucumber/filters/activate_steps.rb +5 -3
  26. data/lib/cucumber/filters/broadcast_test_case_ready_event.rb +12 -0
  27. data/lib/cucumber/filters/prepare_world.rb +5 -9
  28. data/lib/cucumber/filters/quit.rb +1 -3
  29. data/lib/cucumber/filters/tag_limits/verifier.rb +2 -4
  30. data/lib/cucumber/filters.rb +1 -0
  31. data/lib/cucumber/formatter/ansicolor.rb +40 -52
  32. data/lib/cucumber/formatter/ast_lookup.rb +163 -0
  33. data/lib/cucumber/formatter/backtrace_filter.rb +10 -8
  34. data/lib/cucumber/formatter/console.rb +69 -69
  35. data/lib/cucumber/formatter/console_counts.rb +4 -9
  36. data/lib/cucumber/formatter/console_issues.rb +6 -3
  37. data/lib/cucumber/formatter/duration.rb +1 -1
  38. data/lib/cucumber/formatter/duration_extractor.rb +3 -1
  39. data/lib/cucumber/formatter/errors.rb +6 -0
  40. data/lib/cucumber/formatter/fanout.rb +2 -0
  41. data/lib/cucumber/formatter/html.rb +11 -598
  42. data/lib/cucumber/formatter/http_io.rb +147 -0
  43. data/lib/cucumber/formatter/ignore_missing_messages.rb +1 -1
  44. data/lib/cucumber/formatter/interceptor.rb +11 -30
  45. data/lib/cucumber/formatter/io.rb +55 -13
  46. data/lib/cucumber/formatter/json.rb +115 -122
  47. data/lib/cucumber/formatter/junit.rb +72 -55
  48. data/lib/cucumber/formatter/message.rb +23 -0
  49. data/lib/cucumber/formatter/message_builder.rb +255 -0
  50. data/lib/cucumber/formatter/pretty.rb +360 -153
  51. data/lib/cucumber/formatter/progress.rb +30 -32
  52. data/lib/cucumber/formatter/publish_banner_printer.rb +77 -0
  53. data/lib/cucumber/formatter/query/hook_by_test_step.rb +31 -0
  54. data/lib/cucumber/formatter/query/pickle_by_test.rb +26 -0
  55. data/lib/cucumber/formatter/query/pickle_step_by_test_step.rb +26 -0
  56. data/lib/cucumber/formatter/query/step_definitions_by_test_step.rb +40 -0
  57. data/lib/cucumber/formatter/query/test_case_started_by_test_case.rb +40 -0
  58. data/lib/cucumber/formatter/rerun.rb +22 -4
  59. data/lib/cucumber/formatter/stepdefs.rb +1 -2
  60. data/lib/cucumber/formatter/steps.rb +8 -6
  61. data/lib/cucumber/formatter/summary.rb +16 -8
  62. data/lib/cucumber/formatter/unicode.rb +15 -17
  63. data/lib/cucumber/formatter/url_reporter.rb +17 -0
  64. data/lib/cucumber/formatter/usage.rb +17 -14
  65. data/lib/cucumber/gherkin/data_table_parser.rb +17 -6
  66. data/lib/cucumber/gherkin/formatter/ansi_escapes.rb +13 -17
  67. data/lib/cucumber/gherkin/formatter/escaping.rb +2 -2
  68. data/lib/cucumber/gherkin/steps_parser.rb +17 -8
  69. data/lib/cucumber/glue/dsl.rb +19 -0
  70. data/lib/cucumber/glue/hook.rb +34 -11
  71. data/lib/cucumber/glue/invoke_in_world.rb +13 -18
  72. data/lib/cucumber/glue/proto_world.rb +37 -44
  73. data/lib/cucumber/glue/registry_and_more.rb +71 -12
  74. data/lib/cucumber/glue/registry_wrapper.rb +31 -0
  75. data/lib/cucumber/glue/snippet.rb +23 -22
  76. data/lib/cucumber/glue/step_definition.rb +42 -20
  77. data/lib/cucumber/glue/world_factory.rb +1 -1
  78. data/lib/cucumber/hooks.rb +11 -11
  79. data/lib/cucumber/multiline_argument/data_table/diff_matrices.rb +2 -2
  80. data/lib/cucumber/multiline_argument/data_table.rb +97 -64
  81. data/lib/cucumber/multiline_argument/doc_string.rb +1 -1
  82. data/lib/cucumber/multiline_argument.rb +4 -6
  83. data/lib/cucumber/platform.rb +3 -3
  84. data/lib/cucumber/rake/task.rb +16 -18
  85. data/lib/cucumber/rspec/disable_option_parser.rb +9 -8
  86. data/lib/cucumber/rspec/doubles.rb +3 -5
  87. data/lib/cucumber/running_test_case.rb +2 -53
  88. data/lib/cucumber/runtime/after_hooks.rb +8 -4
  89. data/lib/cucumber/runtime/before_hooks.rb +8 -4
  90. data/lib/cucumber/runtime/for_programming_languages.rb +4 -2
  91. data/lib/cucumber/runtime/step_hooks.rb +6 -2
  92. data/lib/cucumber/runtime/support_code.rb +13 -15
  93. data/lib/cucumber/runtime/user_interface.rb +6 -16
  94. data/lib/cucumber/runtime.rb +77 -59
  95. data/lib/cucumber/step_definition_light.rb +4 -3
  96. data/lib/cucumber/step_definitions.rb +2 -2
  97. data/lib/cucumber/step_match.rb +12 -17
  98. data/lib/cucumber/step_match_search.rb +2 -1
  99. data/lib/cucumber/term/ansicolor.rb +9 -9
  100. data/lib/cucumber/term/banner.rb +56 -0
  101. data/lib/cucumber/version +1 -1
  102. data/lib/cucumber.rb +1 -1
  103. metadata +272 -81
  104. data/lib/cucumber/core_ext/string.rb +0 -11
  105. data/lib/cucumber/events/gherkin_source_parsed.rb~ +0 -14
  106. data/lib/cucumber/formatter/ast_lookup.rb~ +0 -9
  107. data/lib/cucumber/formatter/cucumber.css +0 -286
  108. data/lib/cucumber/formatter/cucumber.sass +0 -247
  109. data/lib/cucumber/formatter/hook_query_visitor.rb +0 -42
  110. data/lib/cucumber/formatter/html_builder.rb +0 -121
  111. data/lib/cucumber/formatter/inline-js.js +0 -30
  112. data/lib/cucumber/formatter/jquery-min.js +0 -154
  113. data/lib/cucumber/formatter/json_pretty.rb +0 -11
  114. data/lib/cucumber/formatter/legacy_api/adapter.rb +0 -1028
  115. data/lib/cucumber/formatter/legacy_api/ast.rb +0 -394
  116. data/lib/cucumber/formatter/legacy_api/results.rb +0 -50
  117. data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +0 -32
  118. data/lib/cucumber/step_argument.rb +0 -25
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class String #:nodoc:
4
- def indent(n)
5
- if n >= 0
6
- gsub(/^/, ' ' * n)
7
- else
8
- gsub(/^ {0,#{-n}}/, '')
9
- end
10
- end
11
- end
@@ -1,14 +0,0 @@
1
- require 'cucumber/core/events'
2
-
3
- module Cucumber
4
- module Events
5
- # Fired after we've read in the contents of a feature file
6
- class GherkinSourceRead < Core::Event.new(:path, :body)
7
- # The path to the file
8
- attr_reader :path
9
-
10
- # The raw Gherkin source
11
- attr_reader :body
12
- end
13
- end
14
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Cucumber
4
- module Formatter
5
- module AstLookup
6
-
7
- end
8
- end
9
- end
@@ -1,286 +0,0 @@
1
- /* cucumber.css is generated from cucumber.sass */
2
- /* Regenerate with rake sass */
3
- body {
4
- font-size: 0px;
5
- color: white;
6
- margin: 0px;
7
- padding: 0px;
8
- }
9
-
10
- .cucumber, td, th {
11
- font: normal 11px "Lucida Grande", Helvetica, sans-serif;
12
- background: white;
13
- color: black;
14
- }
15
- .cucumber #cucumber-header, td #cucumber-header, th #cucumber-header {
16
- background: #65c400;
17
- color: white;
18
- height: 6em;
19
- }
20
- .cucumber #cucumber-header #expand-collapse p, td #cucumber-header #expand-collapse p, th #cucumber-header #expand-collapse p {
21
- float: right;
22
- margin: 0 0 0 10px;
23
- }
24
- .cucumber .scenario h3, td .scenario h3, th .scenario h3, .background h3 {
25
- font-size: 11px;
26
- padding: 3px;
27
- margin: 0;
28
- background: #65c400;
29
- color: white;
30
- font-weight: bold;
31
- }
32
-
33
- .background h3 {
34
- font-size: 1.2em;
35
- background: #666;
36
- }
37
-
38
- .cucumber h1, td h1, th h1 {
39
- margin: 0px 10px 0px 10px;
40
- padding: 10px;
41
- font-family: "Lucida Grande", Helvetica, sans-serif;
42
- font-size: 2em;
43
- position: absolute;
44
- }
45
- .cucumber h4, td h4, th h4 {
46
- margin-bottom: 2px;
47
- }
48
- .cucumber div.feature, td div.feature, th div.feature {
49
- padding: 2px;
50
- margin: 0px 10px 5px 10px;
51
- }
52
- .cucumber div.examples, td div.examples, th div.examples {
53
- padding: 0em 0em 0em 1em;
54
- }
55
- .cucumber .stats, td .stats, th .stats {
56
- margin: 2em;
57
- }
58
- .cucumber .summary ul.features li, td .summary ul.features li, th .summary ul.features li {
59
- display: inline;
60
- }
61
- .cucumber .step_name, td .step_name, th .step_name {
62
- float: left;
63
- }
64
- .cucumber .step_file, td .step_file, th .step_file {
65
- text-align: right;
66
- color: #999999;
67
- }
68
- .cucumber .step_file a, td .step_file a, th .step_file a {
69
- color: #999999;
70
- }
71
- .cucumber .scenario_file, td .scenario_file, th .scenario_file {
72
- float: right;
73
- color: #999999;
74
- }
75
- .cucumber .tag, td .tag, th .tag {
76
- font-weight: bold;
77
- color: #246ac1;
78
- }
79
- .cucumber .backtrace, td .backtrace, th .backtrace {
80
- margin-top: 0;
81
- margin-bottom: 0;
82
- margin-left: 1em;
83
- color: black;
84
- }
85
- .cucumber a, td a, th a {
86
- text-decoration: none;
87
- color: #be5c00;
88
- }
89
- .cucumber a:hover, td a:hover, th a:hover {
90
- text-decoration: underline;
91
- }
92
- .cucumber a:visited, td a:visited, th a:visited {
93
- font-weight: normal;
94
- }
95
- .cucumber a div.examples, td a div.examples, th a div.examples {
96
- margin: 5px 0px 5px 15px;
97
- color: black;
98
- }
99
- .cucumber .outline table, td .outline table, th .outline table {
100
- margin: 0px 0px 5px 10px;
101
- }
102
- .cucumber table, td table, th table {
103
- border-collapse: collapse;
104
- }
105
- .cucumber table td, td table td, th table td {
106
- padding: 3px 3px 3px 5px;
107
- }
108
- .cucumber table td.failed, .cucumber table td.passed, .cucumber table td.skipped, .cucumber table td.pending, .cucumber table td.undefined, td table td.failed, td table td.passed, td table td.skipped, td table td.pending, td table td.undefined, th table td.failed, th table td.passed, th table td.skipped, th table td.pending, th table td.undefined {
109
- padding-left: 18px;
110
- padding-right: 10px;
111
- }
112
- .cucumber table td.failed, td table td.failed, th table td.failed {
113
- border-left: 5px solid #c20000;
114
- border-bottom: 1px solid #c20000;
115
- background: #fffbd3;
116
- color: #c20000;
117
- }
118
- .cucumber table td.passed, td table td.passed, th table td.passed {
119
- border-left: 5px solid #65c400;
120
- border-bottom: 1px solid #65c400;
121
- background: #dbffb4;
122
- color: #3d7700;
123
- }
124
- .cucumber table td.skipped, td table td.skipped, th table td.skipped {
125
- border-left: 5px solid aqua;
126
- border-bottom: 1px solid aqua;
127
- background: #e0ffff;
128
- color: #001111;
129
- }
130
- .cucumber table td.pending, td table td.pending, th table td.pending {
131
- border-left: 5px solid #faf834;
132
- border-bottom: 1px solid #faf834;
133
- background: #fcfb98;
134
- color: #131313;
135
- }
136
- .cucumber table td.undefined, td table td.undefined, th table td.undefined {
137
- border-left: 5px solid #faf834;
138
- border-bottom: 1px solid #faf834;
139
- background: #fcfb98;
140
- color: #131313;
141
- }
142
- .cucumber table td.message, td table td.message, th table td.message {
143
- border-left: 5px solid aqua;
144
- border-bottom: 1px solid aqua;
145
- background: #e0ffff;
146
- color: #001111;
147
- }
148
- .cucumber ol, td ol, th ol {
149
- list-style: none;
150
- margin: 0px;
151
- padding: 0px;
152
- }
153
- .cucumber ol li.step, td ol li.step, th ol li.step {
154
- padding: 3px 3px 3px 18px;
155
- margin: 5px 0px 5px 5px;
156
- }
157
- .cucumber ol li, td ol li, th ol li {
158
- margin: 0em 0em 0em 1em;
159
- padding: 0em 0em 0em 0.2em;
160
- }
161
- .cucumber ol li span.param, td ol li span.param, th ol li span.param {
162
- font-weight: bold;
163
- }
164
- .cucumber ol li.failed, td ol li.failed, th ol li.failed {
165
- border-left: 5px solid #c20000;
166
- border-bottom: 1px solid #c20000;
167
- background: #fffbd3;
168
- color: #c20000;
169
- }
170
- .cucumber ol li.passed, td ol li.passed, th ol li.passed {
171
- border-left: 5px solid #65c400;
172
- border-bottom: 1px solid #65c400;
173
- background: #dbffb4;
174
- color: #3d7700;
175
- }
176
- .cucumber ol li.skipped, td ol li.skipped, th ol li.skipped {
177
- border-left: 5px solid aqua;
178
- border-bottom: 1px solid aqua;
179
- background: #e0ffff;
180
- color: #001111;
181
- }
182
- .cucumber ol li.pending, td ol li.pending, th ol li.pending {
183
- border-left: 5px solid #faf834;
184
- border-bottom: 1px solid #faf834;
185
- background: #fcfb98;
186
- color: #131313;
187
- }
188
- .cucumber ol li.undefined, td ol li.undefined, th ol li.undefined {
189
- border-left: 5px solid #faf834;
190
- border-bottom: 1px solid #faf834;
191
- background: #fcfb98;
192
- color: #131313;
193
- }
194
- .cucumber ol li.message, td ol li.message, th ol li.message {
195
- border-left: 5px solid aqua;
196
- border-bottom: 1px solid aqua;
197
- background: #e0ffff;
198
- color: #001111;
199
- margin-left: 10px;
200
- white-space: pre;
201
- }
202
- .cucumber #summary, td #summary, th #summary {
203
- margin: 0px;
204
- padding: 5px 10px;
205
- text-align: right;
206
- top: 0px;
207
- right: 0px;
208
- float: right;
209
- }
210
- .cucumber #summary p, td #summary p, th #summary p {
211
- margin: 0 0 0 2px;
212
- }
213
- .cucumber #summary #totals, td #summary #totals, th #summary #totals {
214
- font-size: 1.2em;
215
- }
216
-
217
- .ruby {
218
- font-size: 12px;
219
- font-family: monospace;
220
- color: white;
221
- background: black;
222
- padding: 0.1em 0 0.2em 0;
223
- }
224
- .ruby .keyword {
225
- color: #ff6600;
226
- }
227
- .ruby .constant {
228
- color: #339999;
229
- }
230
- .ruby .attribute {
231
- color: white;
232
- }
233
- .ruby .global {
234
- color: white;
235
- }
236
- .ruby .module {
237
- color: white;
238
- }
239
- .ruby .class {
240
- color: white;
241
- }
242
- .ruby .string {
243
- color: #66ff00;
244
- }
245
- .ruby .ident {
246
- color: white;
247
- }
248
- .ruby .method {
249
- color: #ffcc00;
250
- }
251
- .ruby .number {
252
- color: white;
253
- }
254
- .ruby .char {
255
- color: white;
256
- }
257
- .ruby .comment {
258
- color: #9933cc;
259
- }
260
- .ruby .symbol {
261
- color: white;
262
- }
263
- .ruby .regex {
264
- color: #44b4cc;
265
- }
266
- .ruby .punct {
267
- color: white;
268
- }
269
- .ruby .escape {
270
- color: white;
271
- }
272
- .ruby .interp {
273
- color: white;
274
- }
275
- .ruby .expr {
276
- color: white;
277
- }
278
- .ruby .offending {
279
- background: #333333;
280
- }
281
- .ruby .linenum {
282
- width: 75px;
283
- padding: 0.1em 1em 0.2em 0;
284
- color: black;
285
- background: #fffbd3;
286
- }
@@ -1,247 +0,0 @@
1
- /* cucumber.css is generated from cucumber.sass */
2
- /* Regenerate with rake sass */
3
-
4
- $step_left: 5px solid
5
- $step_bottom: 1px solid
6
-
7
- $failed: #fffbd3
8
- $failed_border: #c20000
9
- $failed_text: #c20000
10
-
11
- $passed: #dbffb4
12
- $passed_border: #65c400
13
- $passed_text: #3d7700
14
-
15
- $skipped: #e0ffff
16
- $skipped_border: aqua
17
- $skipped_text: #001111
18
-
19
- $pending: #fcfb98
20
- $pending_border: #faf834
21
- $pending_text: #131313
22
-
23
- $undefined: #fcfb98
24
- $undefined_border: #faf834
25
- $undefined_text: #131313
26
-
27
- $message: #e0ffff
28
- $message_border: aqua
29
- $message_text: #001111
30
-
31
- body
32
- font-size: 0px
33
- color: white
34
- margin: 0px
35
- padding: 0px
36
-
37
- .cucumber,td,th
38
- font: normal 11px "Lucida Grande", Helvetica, sans-serif
39
- background: white
40
- color: black
41
- #cucumber-header
42
- background: #65c400
43
- color: white
44
- height: 6em
45
- #expand-collapse
46
- p
47
- float: right
48
- margin: 0 0 0 10px
49
- .scenario
50
- h3
51
- font-size: 11px
52
- padding: 3px
53
- margin: 0
54
- background: #65c400
55
- color: white
56
- font-weight: bold
57
- h1
58
- margin: 0px 10px 0px 10px
59
- padding: 10px
60
- font-family: "Lucida Grande", Helvetica, sans-serif
61
- font-size: 2em
62
- position: absolute
63
- h4
64
- margin-bottom: 2px
65
- div.feature
66
- padding: 2px
67
- margin: 0px 10px 5px 10px
68
- div.examples
69
- padding: 0em 0em 0em 1em
70
- .stats
71
- margin: 2em
72
- .summary
73
- ul.features
74
- li
75
- display: inline
76
- .step_name
77
- float: left
78
- .step_file
79
- text-align: right
80
- color: #999999
81
- a
82
- color: #999999
83
- .scenario_file
84
- float: right
85
- color: #999999
86
- .tag
87
- font-weight: bold
88
- color: #246ac1
89
- .backtrace
90
- margin-top: 0
91
- margin-bottom: 0
92
- margin-left: 1em
93
- color: black
94
- a
95
- text-decoration: none
96
- color: #be5c00
97
- &:hover
98
- text-decoration: underline
99
- &:visited
100
- font-weight: normal
101
- div.examples
102
- margin: 5px 0px 5px 15px
103
- color: black
104
- .outline
105
- table
106
- margin: 0px 0px 5px 10px
107
- table
108
- border-collapse: collapse
109
- td
110
- padding: 3px 3px 3px 5px
111
- td.failed, td.passed, td.skipped, td.pending, td.undefined
112
- padding-left: 18px
113
- padding-right: 10px
114
- td.failed
115
- border-left: $step_left $failed_border
116
- border-bottom: $step_bottom $failed_border
117
- background: $failed
118
- color: $failed_text
119
- td.passed
120
- border-left: $step_left $passed_border
121
- border-bottom: $step_bottom $passed_border
122
- background: $passed
123
- color: $passed_text
124
- td.skipped
125
- border-left: $step_left $skipped_border
126
- border-bottom: $step_bottom $skipped_border
127
- background: $skipped
128
- color: $skipped_text
129
- td.pending
130
- border-left: $step_left $pending_border
131
- border-bottom: $step_bottom $pending_border
132
- background: $pending
133
- color: $pending_text
134
- td.undefined
135
- border-left: $step_left $undefined_border
136
- border-bottom: $step_bottom $undefined_border
137
- background: $undefined
138
- color: $undefined_text
139
- td.message
140
- border-left: $step_left $message_border
141
- border-bottom: $step_bottom $message_border
142
- background: $message
143
- color: $message_text
144
- ol
145
- list-style: none
146
- margin: 0px
147
- padding: 0px
148
- li.step
149
- padding: 3px 3px 3px 18px
150
- margin: 5px 0px 5px 5px
151
- li
152
- margin: 0em 0em 0em 1em
153
- padding: 0em 0em 0em 0.2em
154
- span.param
155
- font-weight: bold
156
- li.failed
157
- border-left: $step_left $failed_border
158
- border-bottom: $step_bottom $failed_border
159
- background: $failed
160
- color: $failed_text
161
- li.passed
162
- border-left: $step_left $passed_border
163
- border-bottom: $step_bottom $passed_border
164
- background: $passed
165
- color: $passed_text
166
- li.skipped
167
- border-left: $step_left $skipped_border
168
- border-bottom: $step_bottom $skipped_border
169
- background: $skipped
170
- color: $skipped_text
171
- li.pending
172
- border-left: $step_left $pending_border
173
- border-bottom: $step_bottom $pending_border
174
- background: $pending
175
- color: $pending_text
176
- li.undefined
177
- border-left: $step_left $undefined_border
178
- border-bottom: $step_bottom $undefined_border
179
- background: $undefined
180
- color: $undefined_text
181
- li.message
182
- border-left: $step_left $message_border
183
- border-bottom: $step_bottom $message_border
184
- background: $message
185
- color: $message_text
186
- margin-left: 10px
187
- #summary
188
- margin: 0px
189
- padding: 5px 10px
190
- text-align: right
191
- top: 0px
192
- right: 0px
193
- float: right
194
- p
195
- margin: 0 0 0 2px
196
- #totals
197
- font-size: 1.2em
198
-
199
- .ruby
200
- font-size: 12px
201
- font-family: monospace
202
- color: white
203
- background: black
204
- padding: 0.1em 0 0.2em 0
205
- .keyword
206
- color: #ff6600
207
- .constant
208
- color: #339999
209
- .attribute
210
- color: white
211
- .global
212
- color: white
213
- .module
214
- color: white
215
- .class
216
- color: white
217
- .string
218
- color: #66ff00
219
- .ident
220
- color: white
221
- .method
222
- color: #ffcc00
223
- .number
224
- color: white
225
- .char
226
- color: white
227
- .comment
228
- color: #9933cc
229
- .symbol
230
- color: white
231
- .regex
232
- color: #44b4cc
233
- .punct
234
- color: white
235
- .escape
236
- color: white
237
- .interp
238
- color: white
239
- .expr
240
- color: white
241
- .offending
242
- background: #333333
243
- .linenum
244
- width: 75px
245
- padding: 0.1em 1em 0.2em 0
246
- color: black
247
- background: #fffbd3
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Cucumber
4
- module Formatter
5
- class HookQueryVisitor
6
- attr_reader :type
7
-
8
- def initialize(test_step)
9
- @hook = false
10
- @type = :no_hook
11
- test_step.source.last.describe_to(self)
12
- end
13
-
14
- def hook?
15
- @hook
16
- end
17
-
18
- def step(*)
19
- end
20
-
21
- def before_hook(*)
22
- @hook = true
23
- @type = :before
24
- end
25
-
26
- def after_hook(*)
27
- @hook = true
28
- @type = :after
29
- end
30
-
31
- def after_step_hook(*)
32
- @hook = true
33
- @type = :after_step
34
- end
35
-
36
- def around_hook(*)
37
- @hook = true
38
- @type = :around
39
- end
40
- end
41
- end
42
- end