aslakhellesoy-cucumber 0.2.2.2 → 0.2.3
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.
- data/History.txt +13 -5
- data/Manifest.txt +49 -47
- data/config/hoe.rb +2 -2
- data/examples/tickets/features/246.feature +4 -0
- data/examples/tickets/features/step_definitons/246_steps.rb +3 -0
- data/gem_tasks/rspec.rake +3 -2
- data/lib/cucumber/formatters/unicode.rb +2 -0
- data/lib/cucumber/languages.yml +43 -0
- data/lib/cucumber/parser.rb +2 -7
- data/lib/cucumber/parser/feature.rb +34 -39
- data/lib/cucumber/parser/feature.tt +1 -1
- data/lib/cucumber/parser/i18n.tt +4 -0
- data/lib/cucumber/step_definition.rb +9 -12
- data/lib/cucumber/version.rb +2 -2
- data/rails_generators/cucumber/templates/paths.rb +2 -1
- data/{spec → specs}/cucumber/ast/background_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/feature_factory.rb +0 -0
- data/{spec → specs}/cucumber/ast/feature_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/py_string_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/scenario_outline_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/scenario_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/step_collection_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/step_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/table_spec.rb +0 -0
- data/{spec → specs}/cucumber/ast/tags_spec.rb +0 -0
- data/{spec → specs}/cucumber/broadcaster_spec.rb +0 -0
- data/{spec → specs}/cucumber/cli/configuration_spec.rb +0 -0
- data/{spec → specs}/cucumber/cli/main_spec.rb +0 -0
- data/{spec → specs}/cucumber/core_ext/proc_spec.rb +1 -1
- data/{spec → specs}/cucumber/core_ext/string_spec.rb +0 -0
- data/{spec → specs}/cucumber/formatter/ansicolor_spec.rb +0 -0
- data/{spec → specs}/cucumber/formatter/color_io_spec.rb +0 -0
- data/{spec → specs}/cucumber/formatter/html/cucumber.css +0 -0
- data/{spec → specs}/cucumber/formatter/html/cucumber.js +0 -0
- data/{spec → specs}/cucumber/formatter/html/index.html +0 -0
- data/{spec → specs}/cucumber/formatter/html/jquery-1.3.min.js +0 -0
- data/{spec → specs}/cucumber/formatter/html/jquery.uitableedit.js +0 -0
- data/{spec → specs}/cucumber/formatters/profile_formatter_spec.rb +0 -0
- data/{spec → specs}/cucumber/parser/feature_parser_spec.rb +0 -0
- data/{spec → specs}/cucumber/parser/table_parser_spec.rb +0 -0
- data/{spec → specs}/cucumber/rails/stubs/mini_rails.rb +0 -0
- data/{spec → specs}/cucumber/rails/stubs/test_help.rb +0 -0
- data/{spec → specs}/cucumber/rails/world_spec.rb +0 -0
- data/{spec → specs}/cucumber/sell_cucumbers.feature +0 -0
- data/{spec → specs}/cucumber/step_definition_spec.rb +8 -0
- data/{spec → specs}/cucumber/step_mother_spec.rb +4 -4
- data/{spec → specs}/cucumber/treetop_parser/empty_feature.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/empty_scenario.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/empty_scenario_outline.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/fit_scenario.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/given_scenario.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/invalid_scenario_outlines.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/multiline_steps.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/multiple_tables.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/scenario_outline.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/spaces.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/test_dos.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/with_comments.feature +0 -0
- data/{spec → specs}/cucumber/treetop_parser/with_tags.feature +0 -0
- data/{spec → specs}/cucumber/world/pending_spec.rb +0 -0
- data/{spec → specs}/spec.opts +0 -0
- data/{spec → specs}/spec_helper.rb +0 -0
- metadata +55 -52
data/History.txt
CHANGED
@@ -1,14 +1,22 @@
|
|
1
|
-
== 0.2.3
|
1
|
+
== 0.2.3 2009-03-30
|
2
|
+
|
3
|
+
This release sports 4 updated languages, slightly better help with snippets if you "quote" arguments
|
4
|
+
in your steps. Windows/JRuby users can enjoy colours and you get some more sugar with Tables.
|
2
5
|
|
3
6
|
=== New features
|
4
7
|
* Added new Then /^I should be on (.+)$/ do |page_name| step (Grant Hollingworth)
|
5
8
|
* Use skipped_param color for examples table header (#266 Eugene Naydanov)
|
6
9
|
* Added new Cucumber::Ast::Table#rows_hash method (Torbjørn Vatn)
|
7
|
-
* Windows/JRuby users can now enjoy colourful output (via http://
|
10
|
+
* Windows/JRuby users can now enjoy colourful output (via http://github.com/aslakhellesoy/ansicolor) (#166 Aslak Hellesøy)
|
8
11
|
* Ambiguous step errors hint about --guess (unless --guess already on) (Aslak Hellesøy)
|
9
|
-
*
|
10
|
-
* Updated
|
11
|
-
* Updated
|
12
|
+
* Added translation for Slovak (Ahmed Al Hafoudh)
|
13
|
+
* Updated translation for Dutch (Bart Zonneveld)
|
14
|
+
* Updated translation for Italian (Alessandro Baroni)
|
15
|
+
* Updated translation for Japanese (KAKUTANI Shintaro)
|
16
|
+
|
17
|
+
=== Bugfixes
|
18
|
+
* Fixed step name after step keyword without space (#265 Aslak Hellesøy)
|
19
|
+
* Backtrace is back in HTML reports
|
12
20
|
|
13
21
|
== 0.2.2 2009-03-25
|
14
22
|
|
data/Manifest.txt
CHANGED
@@ -170,10 +170,12 @@ examples/tickets/features/177/3.feature
|
|
170
170
|
examples/tickets/features/180.feature
|
171
171
|
examples/tickets/features/236.feature
|
172
172
|
examples/tickets/features/241.feature
|
173
|
+
examples/tickets/features/246.feature
|
173
174
|
examples/tickets/features/248.feature
|
174
175
|
examples/tickets/features/lib/eatting_machine.rb
|
175
176
|
examples/tickets/features/lib/pantry.rb
|
176
177
|
examples/tickets/features/scenario_outline.feature
|
178
|
+
examples/tickets/features/step_definitons/246_steps.rb
|
177
179
|
examples/tickets/features/step_definitons/248_steps.rb
|
178
180
|
examples/tickets/features/step_definitons/scenario_outline_steps.rb
|
179
181
|
examples/tickets/features/step_definitons/tickets_steps.rb
|
@@ -276,50 +278,50 @@ rails_generators/feature/USAGE
|
|
276
278
|
rails_generators/feature/feature_generator.rb
|
277
279
|
rails_generators/feature/templates/feature.erb
|
278
280
|
rails_generators/feature/templates/steps.erb
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
281
|
+
specs/cucumber/ast/background_spec.rb
|
282
|
+
specs/cucumber/ast/feature_factory.rb
|
283
|
+
specs/cucumber/ast/feature_spec.rb
|
284
|
+
specs/cucumber/ast/py_string_spec.rb
|
285
|
+
specs/cucumber/ast/scenario_outline_spec.rb
|
286
|
+
specs/cucumber/ast/scenario_spec.rb
|
287
|
+
specs/cucumber/ast/step_collection_spec.rb
|
288
|
+
specs/cucumber/ast/step_spec.rb
|
289
|
+
specs/cucumber/ast/table_spec.rb
|
290
|
+
specs/cucumber/ast/tags_spec.rb
|
291
|
+
specs/cucumber/broadcaster_spec.rb
|
292
|
+
specs/cucumber/cli/configuration_spec.rb
|
293
|
+
specs/cucumber/cli/main_spec.rb
|
294
|
+
specs/cucumber/core_ext/proc_spec.rb
|
295
|
+
specs/cucumber/core_ext/string_spec.rb
|
296
|
+
specs/cucumber/formatter/ansicolor_spec.rb
|
297
|
+
specs/cucumber/formatter/color_io_spec.rb
|
298
|
+
specs/cucumber/formatter/html/cucumber.css
|
299
|
+
specs/cucumber/formatter/html/cucumber.js
|
300
|
+
specs/cucumber/formatter/html/index.html
|
301
|
+
specs/cucumber/formatter/html/jquery-1.3.min.js
|
302
|
+
specs/cucumber/formatter/html/jquery.uitableedit.js
|
303
|
+
specs/cucumber/formatters/profile_formatter_spec.rb
|
304
|
+
specs/cucumber/parser/feature_parser_spec.rb
|
305
|
+
specs/cucumber/parser/table_parser_spec.rb
|
306
|
+
specs/cucumber/rails/stubs/mini_rails.rb
|
307
|
+
specs/cucumber/rails/stubs/test_help.rb
|
308
|
+
specs/cucumber/rails/world_spec.rb
|
309
|
+
specs/cucumber/sell_cucumbers.feature
|
310
|
+
specs/cucumber/step_definition_spec.rb
|
311
|
+
specs/cucumber/step_mother_spec.rb
|
312
|
+
specs/cucumber/treetop_parser/empty_feature.feature
|
313
|
+
specs/cucumber/treetop_parser/empty_scenario.feature
|
314
|
+
specs/cucumber/treetop_parser/empty_scenario_outline.feature
|
315
|
+
specs/cucumber/treetop_parser/fit_scenario.feature
|
316
|
+
specs/cucumber/treetop_parser/given_scenario.feature
|
317
|
+
specs/cucumber/treetop_parser/invalid_scenario_outlines.feature
|
318
|
+
specs/cucumber/treetop_parser/multiline_steps.feature
|
319
|
+
specs/cucumber/treetop_parser/multiple_tables.feature
|
320
|
+
specs/cucumber/treetop_parser/scenario_outline.feature
|
321
|
+
specs/cucumber/treetop_parser/spaces.feature
|
322
|
+
specs/cucumber/treetop_parser/test_dos.feature
|
323
|
+
specs/cucumber/treetop_parser/with_comments.feature
|
324
|
+
specs/cucumber/treetop_parser/with_tags.feature
|
325
|
+
specs/cucumber/world/pending_spec.rb
|
326
|
+
specs/spec.opts
|
327
|
+
specs/spec_helper.rb
|
data/config/hoe.rb
CHANGED
@@ -60,8 +60,8 @@ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
|
60
60
|
#p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
|
61
61
|
p.extra_deps = [
|
62
62
|
['term-ansicolor', '>= 1.0.3'],
|
63
|
-
['treetop', '>= 1.2.
|
64
|
-
['polyglot', '>= 0.2.
|
63
|
+
['treetop', '>= 1.2.5'],
|
64
|
+
['polyglot', '>= 0.2.5'], # Remove this when Treetop no longer loads polyglot by default.
|
65
65
|
['diff-lcs', '>= 1.1.2'],
|
66
66
|
['builder', '>= 2.1.2']
|
67
67
|
]
|
data/gem_tasks/rspec.rake
CHANGED
@@ -29,9 +29,10 @@ if require_spec
|
|
29
29
|
|
30
30
|
desc "Run the Cucumber specs"
|
31
31
|
Spec::Rake::SpecTask.new do |t|
|
32
|
-
t.spec_opts = ['--options', "
|
33
|
-
t.spec_files = FileList['
|
32
|
+
t.spec_opts = ['--options', "specs/spec.opts"]
|
33
|
+
t.spec_files = FileList['specs/**/*_spec.rb']
|
34
34
|
t.rcov = ENV['RCOV']
|
35
35
|
t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
|
36
|
+
t.verbose = true
|
36
37
|
end
|
37
38
|
end
|
data/lib/cucumber/languages.yml
CHANGED
@@ -20,6 +20,7 @@
|
|
20
20
|
then: Then
|
21
21
|
and: And
|
22
22
|
but: But
|
23
|
+
space_after_keyword: true
|
23
24
|
|
24
25
|
# Please help us keeping the languages below uptodate. The parsers for a language
|
25
26
|
# that is missing a keyword will expect the English word until the missing word(s)
|
@@ -41,6 +42,7 @@
|
|
41
42
|
then: اذاً|ثم
|
42
43
|
and: و
|
43
44
|
but: لكن
|
45
|
+
space_after_keyword: true
|
44
46
|
"cy":
|
45
47
|
name: Welsh
|
46
48
|
native: Cymraeg
|
@@ -53,6 +55,7 @@
|
|
53
55
|
then: Yna
|
54
56
|
and: A
|
55
57
|
but: Ond
|
58
|
+
space_after_keyword: true
|
56
59
|
"cz":
|
57
60
|
name: Czech
|
58
61
|
native: Česky
|
@@ -67,6 +70,7 @@
|
|
67
70
|
then: Pak
|
68
71
|
and: A
|
69
72
|
but: Ale
|
73
|
+
space_after_keyword: true
|
70
74
|
"da":
|
71
75
|
name: Danish
|
72
76
|
native: dansk
|
@@ -81,6 +85,7 @@
|
|
81
85
|
then: Så
|
82
86
|
and: Og
|
83
87
|
but: Men
|
88
|
+
space_after_keyword: true
|
84
89
|
"de":
|
85
90
|
name: German
|
86
91
|
native: Deutsch
|
@@ -95,6 +100,7 @@
|
|
95
100
|
then: Dann
|
96
101
|
and: Und
|
97
102
|
but: Aber
|
103
|
+
space_after_keyword: true
|
98
104
|
"en-au":
|
99
105
|
name: Australian
|
100
106
|
native: Australian
|
@@ -109,6 +115,7 @@
|
|
109
115
|
then: Ya gotta
|
110
116
|
and: N
|
111
117
|
but: Cept
|
118
|
+
space_after_keyword: true
|
112
119
|
"en-lol":
|
113
120
|
name: LOLCAT
|
114
121
|
native: LOLCAT
|
@@ -123,6 +130,7 @@
|
|
123
130
|
then: DEN
|
124
131
|
and: AN
|
125
132
|
but: BUT
|
133
|
+
space_after_keyword: true
|
126
134
|
"en-tx":
|
127
135
|
name: Texan
|
128
136
|
native: Texan
|
@@ -137,6 +145,7 @@
|
|
137
145
|
then: Then y'all
|
138
146
|
and: And y'all
|
139
147
|
but: But y'all
|
148
|
+
space_after_keyword: true
|
140
149
|
"es":
|
141
150
|
name: Spanish
|
142
151
|
native: español
|
@@ -151,6 +160,7 @@
|
|
151
160
|
then: Entonces
|
152
161
|
and: Y
|
153
162
|
but: Pero
|
163
|
+
space_after_keyword: true
|
154
164
|
"et":
|
155
165
|
name: Estonian
|
156
166
|
native: eesti keel
|
@@ -165,6 +175,7 @@
|
|
165
175
|
then: Siis
|
166
176
|
and: Ja
|
167
177
|
but: Kuid
|
178
|
+
space_after_keyword: true
|
168
179
|
"fi":
|
169
180
|
name: Finnish
|
170
181
|
native: suomi
|
@@ -179,6 +190,7 @@
|
|
179
190
|
then: Niin
|
180
191
|
and: Ja
|
181
192
|
but: Mutta
|
193
|
+
space_after_keyword: true
|
182
194
|
"fr":
|
183
195
|
name: French
|
184
196
|
native: français
|
@@ -193,6 +205,7 @@
|
|
193
205
|
then: Alors
|
194
206
|
and: Et
|
195
207
|
but: Mais
|
208
|
+
space_after_keyword: true
|
196
209
|
"id":
|
197
210
|
name: Indonesian
|
198
211
|
native: Bahasa Indonesia
|
@@ -207,6 +220,7 @@
|
|
207
220
|
then: Maka
|
208
221
|
and: Dan
|
209
222
|
but: Tapi
|
223
|
+
space_after_keyword: true
|
210
224
|
"it":
|
211
225
|
name: Italian
|
212
226
|
native: italiano
|
@@ -221,6 +235,7 @@
|
|
221
235
|
then: Allora
|
222
236
|
and: E
|
223
237
|
but: Ma
|
238
|
+
space_after_keyword: true
|
224
239
|
"ja":
|
225
240
|
name: Japanese
|
226
241
|
native: 日本語
|
@@ -235,6 +250,7 @@
|
|
235
250
|
then: ならば
|
236
251
|
and: かつ
|
237
252
|
but: しかし
|
253
|
+
space_after_keyword: false
|
238
254
|
"lt":
|
239
255
|
name: Lithuanian
|
240
256
|
native: lietuvių kalba
|
@@ -247,6 +263,7 @@
|
|
247
263
|
then: Tada
|
248
264
|
and: Ir
|
249
265
|
but: Bet
|
266
|
+
space_after_keyword: true
|
250
267
|
"nl":
|
251
268
|
name: Dutch
|
252
269
|
native: Nederlands
|
@@ -261,6 +278,7 @@
|
|
261
278
|
then: Dan
|
262
279
|
and: En
|
263
280
|
but: Maar
|
281
|
+
space_after_keyword: true
|
264
282
|
"no":
|
265
283
|
name: Norwegian
|
266
284
|
native: norsk
|
@@ -275,6 +293,7 @@
|
|
275
293
|
then: Så
|
276
294
|
and: Og
|
277
295
|
but: Men
|
296
|
+
space_after_keyword: true
|
278
297
|
"pl":
|
279
298
|
name: Polish
|
280
299
|
native: polski
|
@@ -286,6 +305,7 @@
|
|
286
305
|
then: Wtedy
|
287
306
|
and: Oraz
|
288
307
|
but: Ale
|
308
|
+
space_after_keyword: true
|
289
309
|
"pt":
|
290
310
|
name: Portuguese
|
291
311
|
native: português
|
@@ -300,6 +320,7 @@
|
|
300
320
|
then: Então
|
301
321
|
and: E
|
302
322
|
but: Mas
|
323
|
+
space_after_keyword: true
|
303
324
|
"ro":
|
304
325
|
name: Romanian
|
305
326
|
native: română
|
@@ -311,6 +332,7 @@
|
|
311
332
|
then: Atunci
|
312
333
|
and: Si
|
313
334
|
but: Dar
|
335
|
+
space_after_keyword: true
|
314
336
|
"ro2":
|
315
337
|
name: Romanian (diacritical)
|
316
338
|
native: română (diacritical)
|
@@ -322,6 +344,7 @@
|
|
322
344
|
then: Atunci
|
323
345
|
and: Și
|
324
346
|
but: Dar
|
347
|
+
space_after_keyword: true
|
325
348
|
"ru":
|
326
349
|
name: Russian
|
327
350
|
native: русский
|
@@ -336,6 +359,7 @@
|
|
336
359
|
then: То
|
337
360
|
and: И|К тому же
|
338
361
|
but: Но|А
|
362
|
+
space_after_keyword: true
|
339
363
|
"se":
|
340
364
|
name: Swedish
|
341
365
|
native: Svenska
|
@@ -350,6 +374,22 @@
|
|
350
374
|
then: Så
|
351
375
|
and: Och
|
352
376
|
but: Men
|
377
|
+
space_after_keyword: true
|
378
|
+
"sk":
|
379
|
+
name: Slovak
|
380
|
+
native: Slovensky
|
381
|
+
encoding: UTF-8
|
382
|
+
feature: Požiadavka
|
383
|
+
background: Pozadie
|
384
|
+
scenario: Scenár
|
385
|
+
scenario_outline: Náčrt Scenáru
|
386
|
+
examples: Príklady
|
387
|
+
given: Pokiaľ
|
388
|
+
when: Keď
|
389
|
+
then: Tak
|
390
|
+
and: A
|
391
|
+
but: Ale
|
392
|
+
space_after_keyword: true
|
353
393
|
"zh-CN":
|
354
394
|
name: Chinese simplified
|
355
395
|
native: 简体中文
|
@@ -364,6 +404,7 @@
|
|
364
404
|
then: 那么
|
365
405
|
and: 而且
|
366
406
|
but: 但是
|
407
|
+
space_after_keyword: false
|
367
408
|
"zh-TW":
|
368
409
|
name: Chinese traditional
|
369
410
|
native: 繁體中文
|
@@ -378,6 +419,7 @@
|
|
378
419
|
then: 那麼
|
379
420
|
and: 而且|並且
|
380
421
|
but: 但是
|
422
|
+
space_after_keyword: false
|
381
423
|
"ko":
|
382
424
|
name: Korean
|
383
425
|
native: 한국어
|
@@ -392,3 +434,4 @@
|
|
392
434
|
then: 그러면
|
393
435
|
and: 그리고
|
394
436
|
but: 하지만
|
437
|
+
space_after_keyword: false
|
data/lib/cucumber/parser.rb
CHANGED
@@ -13,12 +13,6 @@ module Cucumber
|
|
13
13
|
#
|
14
14
|
# The AST classes are defined in the Cucumber::Ast module.
|
15
15
|
module Parser
|
16
|
-
translator = Module.new do
|
17
|
-
def keywordz(key)
|
18
|
-
'Scenario'
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
16
|
def self.load_parser(keywords)
|
23
17
|
Loader.new(keywords)
|
24
18
|
end
|
@@ -34,7 +28,8 @@ module Cucumber
|
|
34
28
|
require 'cucumber/parser/feature'
|
35
29
|
end
|
36
30
|
|
37
|
-
def keywords(key)
|
31
|
+
def keywords(key, raw=false)
|
32
|
+
return @keywords[key] if raw
|
38
33
|
values = @keywords[key].split('|')
|
39
34
|
values.map{|value| "'#{value}'"}.join(" / ")
|
40
35
|
end
|
@@ -870,6 +870,10 @@ module Cucumber
|
|
870
870
|
elements[2]
|
871
871
|
end
|
872
872
|
|
873
|
+
def keyword_space
|
874
|
+
elements[3]
|
875
|
+
end
|
876
|
+
|
873
877
|
def name
|
874
878
|
elements[4]
|
875
879
|
end
|
@@ -920,60 +924,51 @@ module Cucumber
|
|
920
924
|
r4 = _nt_step_keyword
|
921
925
|
s0 << r4
|
922
926
|
if r4
|
923
|
-
|
924
|
-
loop do
|
925
|
-
r6 = _nt_space
|
926
|
-
if r6
|
927
|
-
s5 << r6
|
928
|
-
else
|
929
|
-
break
|
930
|
-
end
|
931
|
-
end
|
932
|
-
r5 = SyntaxNode.new(input, i5...index, s5)
|
927
|
+
r5 = _nt_keyword_space
|
933
928
|
s0 << r5
|
934
929
|
if r5
|
935
|
-
|
936
|
-
s0 <<
|
937
|
-
if
|
938
|
-
|
939
|
-
|
930
|
+
r6 = _nt_line_to_eol
|
931
|
+
s0 << r6
|
932
|
+
if r6
|
933
|
+
i7 = index
|
934
|
+
s8, i8 = [], index
|
940
935
|
loop do
|
941
|
-
|
942
|
-
if
|
943
|
-
|
936
|
+
r9 = _nt_eol
|
937
|
+
if r9
|
938
|
+
s8 << r9
|
944
939
|
else
|
945
940
|
break
|
946
941
|
end
|
947
942
|
end
|
948
|
-
if
|
949
|
-
self.index =
|
950
|
-
|
943
|
+
if s8.empty?
|
944
|
+
self.index = i8
|
945
|
+
r8 = nil
|
951
946
|
else
|
952
|
-
|
947
|
+
r8 = SyntaxNode.new(input, i8...index, s8)
|
953
948
|
end
|
954
|
-
if
|
955
|
-
|
949
|
+
if r8
|
950
|
+
r7 = r8
|
956
951
|
else
|
957
|
-
|
958
|
-
if
|
959
|
-
|
952
|
+
r10 = _nt_eof
|
953
|
+
if r10
|
954
|
+
r7 = r10
|
960
955
|
else
|
961
|
-
self.index =
|
962
|
-
|
956
|
+
self.index = i7
|
957
|
+
r7 = nil
|
963
958
|
end
|
964
959
|
end
|
965
|
-
s0 <<
|
966
|
-
if
|
967
|
-
|
968
|
-
if
|
969
|
-
|
960
|
+
s0 << r7
|
961
|
+
if r7
|
962
|
+
r12 = _nt_multiline_arg
|
963
|
+
if r12
|
964
|
+
r11 = r12
|
970
965
|
else
|
971
|
-
|
966
|
+
r11 = SyntaxNode.new(input, index...index)
|
972
967
|
end
|
973
|
-
s0 <<
|
974
|
-
if
|
975
|
-
|
976
|
-
s0 <<
|
968
|
+
s0 << r11
|
969
|
+
if r11
|
970
|
+
r13 = _nt_white
|
971
|
+
s0 << r13
|
977
972
|
end
|
978
973
|
end
|
979
974
|
end
|
@@ -121,7 +121,7 @@ module Cucumber
|
|
121
121
|
end
|
122
122
|
|
123
123
|
rule step
|
124
|
-
comment space* step_keyword
|
124
|
+
comment space* step_keyword keyword_space name:line_to_eol (eol+ / eof) multi:multiline_arg? white {
|
125
125
|
def build
|
126
126
|
if multi.respond_to?(:build)
|
127
127
|
Ast::Step.new(step_keyword.line, step_keyword.text_value, name.text_value.strip, multi.build)
|
data/lib/cucumber/parser/i18n.tt
CHANGED
@@ -56,23 +56,20 @@ module Cucumber
|
|
56
56
|
# end
|
57
57
|
#
|
58
58
|
class StepDefinition
|
59
|
+
PARAM_PATTERN = /"([^\"]*)"/
|
60
|
+
ESCAPED_PARAM_PATTERN = '"([^\\"]*)"'
|
61
|
+
|
59
62
|
def self.snippet_text(step_keyword, step_name)
|
60
63
|
escaped = Regexp.escape(step_name).gsub('\ ', ' ').gsub('/', '\/')
|
61
|
-
|
64
|
+
escaped = escaped.gsub(PARAM_PATTERN, ESCAPED_PARAM_PATTERN)
|
62
65
|
|
63
|
-
|
64
|
-
|
65
|
-
n
|
66
|
-
|
67
|
-
n += 1
|
68
|
-
"arg#{n}"
|
69
|
-
end
|
70
|
-
block_arg_string = " |#{block_args.join(", ")}|"
|
71
|
-
else
|
72
|
-
block_arg_string = ""
|
66
|
+
n = 0
|
67
|
+
block_args = escaped.scan(ESCAPED_PARAM_PATTERN).map do |a|
|
68
|
+
n += 1
|
69
|
+
"arg#{n}"
|
73
70
|
end
|
71
|
+
block_arg_string = block_args.empty? ? "" : " |#{block_args.join(", ")}|"
|
74
72
|
|
75
|
-
escaped = escaped.gsub(param_pattern, '"([^\\"]*)"')
|
76
73
|
"#{step_keyword} /^#{escaped}$/ do#{block_arg_string}\n pending\nend"
|
77
74
|
end
|
78
75
|
|
data/lib/cucumber/version.rb
CHANGED
@@ -8,7 +8,8 @@ module NavigationHelpers
|
|
8
8
|
# Add more page name => path mappings here
|
9
9
|
|
10
10
|
else
|
11
|
-
raise "Can't find mapping from \"#{page_name}\" to a path
|
11
|
+
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
|
12
|
+
"Now, go and add a mapping in features/support/paths.rb"
|
12
13
|
end
|
13
14
|
end
|
14
15
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -32,6 +32,6 @@ describe Proc do
|
|
32
32
|
|
33
33
|
it "should remove extraneous path info for file" do
|
34
34
|
proc = lambda {|a,b|}
|
35
|
-
proc.file_colon_line.should == "
|
35
|
+
proc.file_colon_line.should == "specs/cucumber/core_ext/proc_spec.rb:34"
|
36
36
|
end
|
37
37
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -82,6 +82,14 @@ module Cucumber
|
|
82
82
|
})
|
83
83
|
end
|
84
84
|
|
85
|
+
it "should recognise several quoted words in name and make according regexp and args" do
|
86
|
+
StepDefinition.snippet_text('Given', 'A "first" and "second" arg').should == unindented(%{
|
87
|
+
Given /^A "([^\\"]*)" and "([^\\"]*)" arg$/ do |arg1, arg2|
|
88
|
+
pending
|
89
|
+
end
|
90
|
+
})
|
91
|
+
end
|
92
|
+
|
85
93
|
it "should not use quote group when there are no quotes" do
|
86
94
|
StepDefinition.snippet_text('Given', 'A first arg').should == unindented(%{
|
87
95
|
Given /^A first arg$/ do
|
@@ -27,8 +27,8 @@ module Cucumber
|
|
27
27
|
@step_mother.step_match("Three blind mice")
|
28
28
|
end.should raise_error(Ambiguous, %{Ambiguous match of "Three blind mice":
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
specs/cucumber/step_mother_spec.rb:23:in `/Three (.*) mice/'
|
31
|
+
specs/cucumber/step_mother_spec.rb:24:in `/Three blind (.*)/'
|
32
32
|
|
33
33
|
You can run again with --guess to make Cucumber be more smart about it
|
34
34
|
})
|
@@ -43,8 +43,8 @@ You can run again with --guess to make Cucumber be more smart about it
|
|
43
43
|
@step_mother.step_match("Three cute mice")
|
44
44
|
end.should raise_error(Ambiguous, %{Ambiguous match of "Three cute mice":
|
45
45
|
|
46
|
-
|
47
|
-
|
46
|
+
specs/cucumber/step_mother_spec.rb:39:in `/Three (.*) mice/'
|
47
|
+
specs/cucumber/step_mother_spec.rb:40:in `/Three cute (.*)/'
|
48
48
|
|
49
49
|
})
|
50
50
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{spec → specs}/spec.opts
RENAMED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aslakhellesoy-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-30 00:00:00 -07:00
|
13
13
|
default_executable: cucumber
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.2.
|
33
|
+
version: 1.2.5
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: polyglot
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.2.
|
43
|
+
version: 0.2.5
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: diff-lcs
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 1.
|
73
|
+
version: 1.11.0
|
74
74
|
version:
|
75
75
|
description: Executable Feature scenarios
|
76
76
|
email:
|
@@ -257,10 +257,12 @@ files:
|
|
257
257
|
- examples/tickets/features/180.feature
|
258
258
|
- examples/tickets/features/236.feature
|
259
259
|
- examples/tickets/features/241.feature
|
260
|
+
- examples/tickets/features/246.feature
|
260
261
|
- examples/tickets/features/248.feature
|
261
262
|
- examples/tickets/features/lib/eatting_machine.rb
|
262
263
|
- examples/tickets/features/lib/pantry.rb
|
263
264
|
- examples/tickets/features/scenario_outline.feature
|
265
|
+
- examples/tickets/features/step_definitons/246_steps.rb
|
264
266
|
- examples/tickets/features/step_definitons/248_steps.rb
|
265
267
|
- examples/tickets/features/step_definitons/scenario_outline_steps.rb
|
266
268
|
- examples/tickets/features/step_definitons/tickets_steps.rb
|
@@ -333,6 +335,7 @@ files:
|
|
333
335
|
- lib/cucumber/formatter/rerun.rb
|
334
336
|
- lib/cucumber/formatter/unicode.rb
|
335
337
|
- lib/cucumber/formatter/usage.rb
|
338
|
+
- lib/cucumber/formatters/unicode.rb
|
336
339
|
- lib/cucumber/languages.yml
|
337
340
|
- lib/cucumber/parser.rb
|
338
341
|
- lib/cucumber/parser/basic.rb
|
@@ -362,53 +365,53 @@ files:
|
|
362
365
|
- rails_generators/feature/feature_generator.rb
|
363
366
|
- rails_generators/feature/templates/feature.erb
|
364
367
|
- rails_generators/feature/templates/steps.erb
|
365
|
-
-
|
366
|
-
-
|
367
|
-
-
|
368
|
-
-
|
369
|
-
-
|
370
|
-
-
|
371
|
-
-
|
372
|
-
-
|
373
|
-
-
|
374
|
-
-
|
375
|
-
-
|
376
|
-
-
|
377
|
-
-
|
378
|
-
-
|
379
|
-
-
|
380
|
-
-
|
381
|
-
-
|
382
|
-
-
|
383
|
-
-
|
384
|
-
-
|
385
|
-
-
|
386
|
-
-
|
387
|
-
-
|
388
|
-
-
|
389
|
-
-
|
390
|
-
-
|
391
|
-
-
|
392
|
-
-
|
393
|
-
-
|
394
|
-
-
|
395
|
-
-
|
396
|
-
-
|
397
|
-
-
|
398
|
-
-
|
399
|
-
-
|
400
|
-
-
|
401
|
-
-
|
402
|
-
-
|
403
|
-
-
|
404
|
-
-
|
405
|
-
-
|
406
|
-
-
|
407
|
-
-
|
408
|
-
-
|
409
|
-
-
|
410
|
-
-
|
411
|
-
-
|
368
|
+
- specs/cucumber/ast/background_spec.rb
|
369
|
+
- specs/cucumber/ast/feature_factory.rb
|
370
|
+
- specs/cucumber/ast/feature_spec.rb
|
371
|
+
- specs/cucumber/ast/py_string_spec.rb
|
372
|
+
- specs/cucumber/ast/scenario_outline_spec.rb
|
373
|
+
- specs/cucumber/ast/scenario_spec.rb
|
374
|
+
- specs/cucumber/ast/step_collection_spec.rb
|
375
|
+
- specs/cucumber/ast/step_spec.rb
|
376
|
+
- specs/cucumber/ast/table_spec.rb
|
377
|
+
- specs/cucumber/ast/tags_spec.rb
|
378
|
+
- specs/cucumber/broadcaster_spec.rb
|
379
|
+
- specs/cucumber/cli/configuration_spec.rb
|
380
|
+
- specs/cucumber/cli/main_spec.rb
|
381
|
+
- specs/cucumber/core_ext/proc_spec.rb
|
382
|
+
- specs/cucumber/core_ext/string_spec.rb
|
383
|
+
- specs/cucumber/formatter/ansicolor_spec.rb
|
384
|
+
- specs/cucumber/formatter/color_io_spec.rb
|
385
|
+
- specs/cucumber/formatter/html/cucumber.css
|
386
|
+
- specs/cucumber/formatter/html/cucumber.js
|
387
|
+
- specs/cucumber/formatter/html/index.html
|
388
|
+
- specs/cucumber/formatter/html/jquery-1.3.min.js
|
389
|
+
- specs/cucumber/formatter/html/jquery.uitableedit.js
|
390
|
+
- specs/cucumber/formatters/profile_formatter_spec.rb
|
391
|
+
- specs/cucumber/parser/feature_parser_spec.rb
|
392
|
+
- specs/cucumber/parser/table_parser_spec.rb
|
393
|
+
- specs/cucumber/rails/stubs/mini_rails.rb
|
394
|
+
- specs/cucumber/rails/stubs/test_help.rb
|
395
|
+
- specs/cucumber/rails/world_spec.rb
|
396
|
+
- specs/cucumber/sell_cucumbers.feature
|
397
|
+
- specs/cucumber/step_definition_spec.rb
|
398
|
+
- specs/cucumber/step_mother_spec.rb
|
399
|
+
- specs/cucumber/treetop_parser/empty_feature.feature
|
400
|
+
- specs/cucumber/treetop_parser/empty_scenario.feature
|
401
|
+
- specs/cucumber/treetop_parser/empty_scenario_outline.feature
|
402
|
+
- specs/cucumber/treetop_parser/fit_scenario.feature
|
403
|
+
- specs/cucumber/treetop_parser/given_scenario.feature
|
404
|
+
- specs/cucumber/treetop_parser/invalid_scenario_outlines.feature
|
405
|
+
- specs/cucumber/treetop_parser/multiline_steps.feature
|
406
|
+
- specs/cucumber/treetop_parser/multiple_tables.feature
|
407
|
+
- specs/cucumber/treetop_parser/scenario_outline.feature
|
408
|
+
- specs/cucumber/treetop_parser/spaces.feature
|
409
|
+
- specs/cucumber/treetop_parser/test_dos.feature
|
410
|
+
- specs/cucumber/treetop_parser/with_comments.feature
|
411
|
+
- specs/cucumber/treetop_parser/with_tags.feature
|
412
|
+
- specs/cucumber/world/pending_spec.rb
|
413
|
+
- specs/spec.opts
|
414
|
+
- specs/spec_helper.rb
|
412
415
|
has_rdoc: true
|
413
416
|
homepage: http://cukes.info
|
414
417
|
post_install_message:
|