cucumber 0.2.3 → 0.3.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 (128) hide show
  1. data/History.txt +56 -1
  2. data/Manifest.txt +70 -49
  3. data/config/hoe.rb +1 -1
  4. data/cucumber.yml +1 -1
  5. data/examples/i18n/bg/Rakefile +6 -0
  6. data/examples/i18n/bg/features/addition.feature +11 -0
  7. data/examples/i18n/bg/features/consecutive_calculations.feature +18 -0
  8. data/examples/i18n/bg/features/division.feature +16 -0
  9. data/examples/i18n/bg/features/step_definitons/calculator_steps.rb +24 -0
  10. data/examples/i18n/bg/features/support/env.rb +6 -0
  11. data/examples/i18n/bg/features/support/world.rb +8 -0
  12. data/examples/i18n/bg/lib/calculator.rb +24 -0
  13. data/examples/i18n/ru/features/support/world.rb +4 -3
  14. data/examples/i18n/sk/Rakefile +6 -0
  15. data/examples/i18n/sk/features/addition.feature +16 -0
  16. data/examples/i18n/sk/features/division.feature +9 -0
  17. data/examples/i18n/sk/features/step_definitons/calculator_steps.rb +24 -0
  18. data/examples/i18n/sk/lib/calculator.rb +14 -0
  19. data/examples/self_test/features/background/background_with_name.feature +7 -0
  20. data/examples/self_test/features/background/passing_background.feature +2 -2
  21. data/examples/self_test/features/step_definitions/sample_steps.rb +18 -2
  22. data/examples/self_test/features/undefined_multiline_args.feature +12 -0
  23. data/examples/sinatra/features/support/env.rb +2 -6
  24. data/examples/test_unit/features/step_definitions/test_unit_steps.rb +1 -4
  25. data/examples/tickets/Rakefile +1 -1
  26. data/examples/tickets/features/229/tagged_hooks.feature +8 -0
  27. data/examples/tickets/features/229/tagged_hooks.rb +14 -0
  28. data/examples/tickets/features/270/back.feature +14 -0
  29. data/examples/tickets/features/270/back.steps.rb +14 -0
  30. data/examples/tickets/features/279/py_string_indent.feature +25 -0
  31. data/examples/tickets/features/279/py_string_indent.steps.rb +12 -0
  32. data/examples/tickets/features/279/wrong.feature_ +11 -0
  33. data/examples/tickets/features/step_definitons/tickets_steps.rb +0 -7
  34. data/features/background.feature +21 -3
  35. data/features/cucumber_cli.feature +18 -5
  36. data/features/cucumber_cli_outlines.feature +4 -1
  37. data/features/rake_task.feature +132 -0
  38. data/features/snippet.feature +23 -0
  39. data/features/step_definitions/cucumber_steps.rb +46 -15
  40. data/features/support/env.rb +61 -4
  41. data/features/usage.feature +5 -0
  42. data/gem_tasks/deployment.rake +1 -1
  43. data/lib/cucumber/ast/background.rb +14 -4
  44. data/lib/cucumber/ast/examples.rb +0 -12
  45. data/lib/cucumber/ast/feature.rb +2 -12
  46. data/lib/cucumber/ast/feature_element.rb +4 -8
  47. data/lib/cucumber/ast/features.rb +1 -1
  48. data/lib/cucumber/ast/outline_table.rb +20 -20
  49. data/lib/cucumber/ast/py_string.rb +6 -11
  50. data/lib/cucumber/ast/scenario.rb +1 -8
  51. data/lib/cucumber/ast/scenario_outline.rb +1 -11
  52. data/lib/cucumber/ast/step.rb +3 -9
  53. data/lib/cucumber/ast/step_collection.rb +0 -4
  54. data/lib/cucumber/ast/step_invocation.rb +5 -6
  55. data/lib/cucumber/ast/table.rb +5 -22
  56. data/lib/cucumber/ast/tags.rb +9 -9
  57. data/lib/cucumber/ast/visitor.rb +12 -25
  58. data/lib/cucumber/cli/configuration.rb +4 -4
  59. data/lib/cucumber/cli/main.rb +10 -3
  60. data/lib/cucumber/core_ext/instance_exec.rb +17 -4
  61. data/lib/cucumber/formatter/ansicolor.rb +1 -1
  62. data/lib/cucumber/formatter/console.rb +2 -1
  63. data/lib/cucumber/formatter/html.rb +21 -7
  64. data/lib/cucumber/formatter/pretty.rb +27 -20
  65. data/lib/cucumber/formatter/usage.rb +16 -0
  66. data/lib/cucumber/languages.yml +23 -5
  67. data/lib/cucumber/parser/feature.rb +231 -114
  68. data/lib/cucumber/parser/feature.tt +120 -25
  69. data/lib/cucumber/parser/table.rb +37 -25
  70. data/lib/cucumber/parser/table.tt +15 -3
  71. data/lib/cucumber/parser/treetop_ext.rb +48 -9
  72. data/lib/cucumber/rake/task.rb +29 -6
  73. data/lib/cucumber/step_definition.rb +4 -2
  74. data/lib/cucumber/step_mother.rb +143 -26
  75. data/lib/cucumber/version.rb +2 -2
  76. data/rails_generators/cucumber/templates/paths.rb +13 -4
  77. data/rails_generators/cucumber/templates/webrat_steps.rb +16 -0
  78. data/{specs → spec}/cucumber/ast/background_spec.rb +1 -0
  79. data/{specs → spec}/cucumber/ast/feature_factory.rb +1 -1
  80. data/{specs → spec}/cucumber/ast/feature_spec.rb +2 -2
  81. data/{specs → spec}/cucumber/ast/py_string_spec.rb +0 -0
  82. data/{specs → spec}/cucumber/ast/scenario_outline_spec.rb +0 -0
  83. data/{specs → spec}/cucumber/ast/scenario_spec.rb +0 -27
  84. data/{specs → spec}/cucumber/ast/step_collection_spec.rb +0 -0
  85. data/{specs → spec}/cucumber/ast/step_spec.rb +0 -0
  86. data/{specs → spec}/cucumber/ast/table_spec.rb +2 -2
  87. data/{specs → spec}/cucumber/broadcaster_spec.rb +0 -0
  88. data/{specs → spec}/cucumber/cli/configuration_spec.rb +0 -0
  89. data/{specs → spec}/cucumber/cli/main_spec.rb +5 -1
  90. data/spec/cucumber/core_ext/proc_spec.rb +54 -0
  91. data/{specs → spec}/cucumber/core_ext/string_spec.rb +0 -0
  92. data/{specs → spec}/cucumber/formatter/ansicolor_spec.rb +0 -0
  93. data/{specs → spec}/cucumber/formatter/color_io_spec.rb +0 -0
  94. data/{specs → spec}/cucumber/formatter/html/cucumber.css +0 -0
  95. data/{specs → spec}/cucumber/formatter/html/cucumber.js +0 -0
  96. data/{specs → spec}/cucumber/formatter/html/index.html +0 -0
  97. data/{specs → spec}/cucumber/formatter/html/jquery-1.3.min.js +0 -0
  98. data/{specs → spec}/cucumber/formatter/html/jquery.uitableedit.js +0 -0
  99. data/{specs → spec}/cucumber/formatters/profile_formatter_spec.rb +0 -0
  100. data/{specs → spec}/cucumber/parser/feature_parser_spec.rb +43 -41
  101. data/{specs → spec}/cucumber/parser/table_parser_spec.rb +0 -0
  102. data/{specs → spec}/cucumber/rails/stubs/mini_rails.rb +0 -0
  103. data/{specs → spec}/cucumber/rails/stubs/test_help.rb +0 -0
  104. data/{specs → spec}/cucumber/rails/world_spec.rb +0 -0
  105. data/{specs → spec}/cucumber/sell_cucumbers.feature +0 -0
  106. data/{specs → spec}/cucumber/step_definition_spec.rb +0 -0
  107. data/{specs → spec}/cucumber/step_mother_spec.rb +63 -4
  108. data/{specs → spec}/cucumber/treetop_parser/empty_feature.feature +0 -0
  109. data/{specs → spec}/cucumber/treetop_parser/empty_scenario.feature +0 -0
  110. data/{specs → spec}/cucumber/treetop_parser/empty_scenario_outline.feature +0 -0
  111. data/{specs → spec}/cucumber/treetop_parser/fit_scenario.feature +0 -0
  112. data/{specs → spec}/cucumber/treetop_parser/given_scenario.feature +0 -0
  113. data/{specs → spec}/cucumber/treetop_parser/invalid_scenario_outlines.feature +0 -0
  114. data/{specs → spec}/cucumber/treetop_parser/multiline_steps.feature +0 -0
  115. data/{specs → spec}/cucumber/treetop_parser/multiple_tables.feature +0 -0
  116. data/{specs → spec}/cucumber/treetop_parser/scenario_outline.feature +0 -0
  117. data/{specs → spec}/cucumber/treetop_parser/spaces.feature +0 -0
  118. data/{specs → spec}/cucumber/treetop_parser/test_dos.feature +0 -0
  119. data/{specs → spec}/cucumber/treetop_parser/with_comments.feature +0 -0
  120. data/{specs → spec}/cucumber/treetop_parser/with_tags.feature +0 -0
  121. data/{specs → spec}/cucumber/world/pending_spec.rb +0 -0
  122. data/{specs → spec}/spec.opts +0 -0
  123. data/{specs → spec}/spec_helper.rb +2 -11
  124. metadata +72 -51
  125. data/examples/tickets/cucumber.yml +0 -3
  126. data/lib/cucumber/parser/basic.rb +0 -0
  127. data/specs/cucumber/ast/tags_spec.rb +0 -19
  128. data/specs/cucumber/core_ext/proc_spec.rb +0 -37
File without changes
@@ -1,21 +1,12 @@
1
1
  require 'rubygems'
2
2
  gem 'rspec'
3
- require 'spec/expectations'
3
+ require 'spec'
4
+ require 'spec/autorun'
4
5
 
5
6
  ENV['CUCUMBER_COLORS']=nil
6
- $KCODE='u'
7
7
  $:.unshift(File.dirname(__FILE__) + '/../lib')
8
8
  require 'cucumber'
9
9
  Cucumber.load_language('en')
10
10
  $:.unshift(File.dirname(__FILE__))
11
11
 
12
12
  ::Term::ANSIColor.coloring = true
13
-
14
- # Open up the tree classes a little for easier inspection.
15
- module Cucumber
16
- module Tree
17
- class Feature
18
- attr_reader :header, :scenarios
19
- end
20
- end
21
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
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-30 00:00:00 +02:00
12
+ date: 2009-04-14 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -108,6 +108,14 @@ files:
108
108
  - examples/i18n/ar/features/addition.feature
109
109
  - examples/i18n/ar/features/step_definitons/calculator_steps.rb
110
110
  - examples/i18n/ar/lib/calculator.rb
111
+ - examples/i18n/bg/Rakefile
112
+ - examples/i18n/bg/features/addition.feature
113
+ - examples/i18n/bg/features/consecutive_calculations.feature
114
+ - examples/i18n/bg/features/division.feature
115
+ - examples/i18n/bg/features/step_definitons/calculator_steps.rb
116
+ - examples/i18n/bg/features/support/env.rb
117
+ - examples/i18n/bg/features/support/world.rb
118
+ - examples/i18n/bg/lib/calculator.rb
111
119
  - examples/i18n/da/Rakefile
112
120
  - examples/i18n/da/features/step_definitons/kalkulator_steps.rb
113
121
  - examples/i18n/da/features/summering.feature
@@ -195,6 +203,11 @@ files:
195
203
  - examples/i18n/se/features/step_definitons/kalkulator_steps.rb
196
204
  - examples/i18n/se/features/summering.feature
197
205
  - examples/i18n/se/lib/kalkulator.rb
206
+ - examples/i18n/sk/Rakefile
207
+ - examples/i18n/sk/features/addition.feature
208
+ - examples/i18n/sk/features/division.feature
209
+ - examples/i18n/sk/features/step_definitons/calculator_steps.rb
210
+ - examples/i18n/sk/lib/calculator.rb
198
211
  - examples/i18n/zh-CN/Rakefile
199
212
  - examples/i18n/zh-CN/features/addition.feature
200
213
  - examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb
@@ -222,6 +235,7 @@ files:
222
235
  - examples/selenium_webrat/features/support/env.rb
223
236
  - examples/self_test/README.textile
224
237
  - examples/self_test/Rakefile
238
+ - examples/self_test/features/background/background_with_name.feature
225
239
  - examples/self_test/features/background/failing_background.feature
226
240
  - examples/self_test/features/background/failing_background_after_success.feature
227
241
  - examples/self_test/features/background/multiline_args_background.feature
@@ -238,6 +252,7 @@ files:
238
252
  - examples/self_test/features/support/env.rb
239
253
  - examples/self_test/features/support/tag_count_formatter.rb
240
254
  - examples/self_test/features/tons_of_cukes.feature
255
+ - examples/self_test/features/undefined_multiline_args.feature
241
256
  - examples/sinatra/Rakefile
242
257
  - examples/sinatra/app.rb
243
258
  - examples/sinatra/features/add.feature
@@ -249,16 +264,22 @@ files:
249
264
  - examples/test_unit/features/step_definitions/test_unit_steps.rb
250
265
  - examples/test_unit/features/test_unit.feature
251
266
  - examples/tickets/Rakefile
252
- - examples/tickets/cucumber.yml
253
267
  - examples/tickets/features/172.feature
254
268
  - examples/tickets/features/177/1.feature
255
269
  - examples/tickets/features/177/2.feature
256
270
  - examples/tickets/features/177/3.feature
257
271
  - examples/tickets/features/180.feature
272
+ - examples/tickets/features/229/tagged_hooks.feature
273
+ - examples/tickets/features/229/tagged_hooks.rb
258
274
  - examples/tickets/features/236.feature
259
275
  - examples/tickets/features/241.feature
260
276
  - examples/tickets/features/246.feature
261
277
  - examples/tickets/features/248.feature
278
+ - examples/tickets/features/270/back.feature
279
+ - examples/tickets/features/270/back.steps.rb
280
+ - examples/tickets/features/279/py_string_indent.feature
281
+ - examples/tickets/features/279/py_string_indent.steps.rb
282
+ - examples/tickets/features/279/wrong.feature_
262
283
  - examples/tickets/features/lib/eatting_machine.rb
263
284
  - examples/tickets/features/lib/pantry.rb
264
285
  - examples/tickets/features/scenario_outline.feature
@@ -277,7 +298,9 @@ files:
277
298
  - features/cucumber_cli_diff_disabled.feature
278
299
  - features/cucumber_cli_outlines.feature
279
300
  - features/custom_formatter.feature
301
+ - features/rake_task.feature
280
302
  - features/report_called_undefined_steps.feature
303
+ - features/snippet.feature
281
304
  - features/step_definitions/cucumber_steps.rb
282
305
  - features/step_definitions/extra_steps.rb
283
306
  - features/support/env.rb
@@ -338,7 +361,6 @@ files:
338
361
  - lib/cucumber/formatters/unicode.rb
339
362
  - lib/cucumber/languages.yml
340
363
  - lib/cucumber/parser.rb
341
- - lib/cucumber/parser/basic.rb
342
364
  - lib/cucumber/parser/feature.rb
343
365
  - lib/cucumber/parser/feature.tt
344
366
  - lib/cucumber/parser/i18n.tt
@@ -365,53 +387,52 @@ files:
365
387
  - rails_generators/feature/feature_generator.rb
366
388
  - rails_generators/feature/templates/feature.erb
367
389
  - rails_generators/feature/templates/steps.erb
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
390
+ - spec/cucumber/ast/background_spec.rb
391
+ - spec/cucumber/ast/feature_factory.rb
392
+ - spec/cucumber/ast/feature_spec.rb
393
+ - spec/cucumber/ast/py_string_spec.rb
394
+ - spec/cucumber/ast/scenario_outline_spec.rb
395
+ - spec/cucumber/ast/scenario_spec.rb
396
+ - spec/cucumber/ast/step_collection_spec.rb
397
+ - spec/cucumber/ast/step_spec.rb
398
+ - spec/cucumber/ast/table_spec.rb
399
+ - spec/cucumber/broadcaster_spec.rb
400
+ - spec/cucumber/cli/configuration_spec.rb
401
+ - spec/cucumber/cli/main_spec.rb
402
+ - spec/cucumber/core_ext/proc_spec.rb
403
+ - spec/cucumber/core_ext/string_spec.rb
404
+ - spec/cucumber/formatter/ansicolor_spec.rb
405
+ - spec/cucumber/formatter/color_io_spec.rb
406
+ - spec/cucumber/formatter/html/cucumber.css
407
+ - spec/cucumber/formatter/html/cucumber.js
408
+ - spec/cucumber/formatter/html/index.html
409
+ - spec/cucumber/formatter/html/jquery-1.3.min.js
410
+ - spec/cucumber/formatter/html/jquery.uitableedit.js
411
+ - spec/cucumber/formatters/profile_formatter_spec.rb
412
+ - spec/cucumber/parser/feature_parser_spec.rb
413
+ - spec/cucumber/parser/table_parser_spec.rb
414
+ - spec/cucumber/rails/stubs/mini_rails.rb
415
+ - spec/cucumber/rails/stubs/test_help.rb
416
+ - spec/cucumber/rails/world_spec.rb
417
+ - spec/cucumber/sell_cucumbers.feature
418
+ - spec/cucumber/step_definition_spec.rb
419
+ - spec/cucumber/step_mother_spec.rb
420
+ - spec/cucumber/treetop_parser/empty_feature.feature
421
+ - spec/cucumber/treetop_parser/empty_scenario.feature
422
+ - spec/cucumber/treetop_parser/empty_scenario_outline.feature
423
+ - spec/cucumber/treetop_parser/fit_scenario.feature
424
+ - spec/cucumber/treetop_parser/given_scenario.feature
425
+ - spec/cucumber/treetop_parser/invalid_scenario_outlines.feature
426
+ - spec/cucumber/treetop_parser/multiline_steps.feature
427
+ - spec/cucumber/treetop_parser/multiple_tables.feature
428
+ - spec/cucumber/treetop_parser/scenario_outline.feature
429
+ - spec/cucumber/treetop_parser/spaces.feature
430
+ - spec/cucumber/treetop_parser/test_dos.feature
431
+ - spec/cucumber/treetop_parser/with_comments.feature
432
+ - spec/cucumber/treetop_parser/with_tags.feature
433
+ - spec/cucumber/world/pending_spec.rb
434
+ - spec/spec.opts
435
+ - spec/spec_helper.rb
415
436
  has_rdoc: true
416
437
  homepage: http://cukes.info
417
438
  post_install_message:
@@ -1,3 +0,0 @@
1
- default: --format pretty
2
- html: --format html --out features.html
3
- progress: --format progress -i -n
File without changes
@@ -1,19 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
2
-
3
- module Cucumber
4
- module Ast
5
- describe Tags do
6
- before do
7
- @tags = Tags.new(-1, %w{one two three})
8
- end
9
-
10
- it "should be among other tags" do
11
- @tags.should have_tags(%w{one})
12
- end
13
-
14
- it "should not be among other tags with irrelevent tag" do
15
- @tags.should_not have_tags(%w{bacon})
16
- end
17
- end
18
- end
19
- end
@@ -1,37 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
2
- require 'cucumber/core_ext/instance_exec'
3
-
4
- describe Proc do
5
- it "should raise ArityMismatchError for too many args (expecting 0)" do
6
- lambda {
7
- Object.new.cucumber_instance_exec(true, 'foo', 1) do
8
- end
9
- }.should raise_error(Cucumber::ArityMismatchError, "expected 0 block argument(s), got 1")
10
- end
11
-
12
- it "should raise ArityMismatchError for too many args (expecting 1)" do
13
- lambda {
14
- Object.new.cucumber_instance_exec(true, 'foo', 1,2) do |a|
15
- end
16
- }.should raise_error(Cucumber::ArityMismatchError, "expected 1 block argument(s), got 2")
17
- end
18
-
19
- it "should raise ArityMismatchError for too few args (expecting 1)" do
20
- lambda {
21
- Object.new.cucumber_instance_exec(true, 'foo') do |a|
22
- end
23
- }.should raise_error(Cucumber::ArityMismatchError, "expected 1 block argument(s), got 0")
24
- end
25
-
26
- it "should raise ArityMismatchError for too few args (expecting 2)" do
27
- lambda {
28
- Object.new.cucumber_instance_exec(true, 'foo', 1) do |a,b|
29
- end
30
- }.should raise_error(Cucumber::ArityMismatchError, "expected 2 block argument(s), got 1")
31
- end
32
-
33
- it "should remove extraneous path info for file" do
34
- proc = lambda {|a,b|}
35
- proc.file_colon_line.should == "specs/cucumber/core_ext/proc_spec.rb:34"
36
- end
37
- end