cucumber 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. data/.rspec +1 -1
  2. data/Caliper.yml +4 -0
  3. data/History.txt +1557 -0
  4. data/LICENSE +1 -1
  5. data/README.rdoc +26 -0
  6. data/Rakefile +51 -5
  7. data/VERSION.yml +5 -0
  8. data/bin/cucumber +1 -7
  9. data/cucumber.gemspec +77 -3
  10. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -1
  11. data/examples/i18n/he/features/step_definitons/calculator_steps.rb +1 -1
  12. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +7 -4
  13. data/examples/i18n/ro/features/suma.feature +11 -0
  14. data/examples/i18n/ru/features/division.feature +2 -2
  15. data/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +3 -3
  16. data/examples/sinatra/features/support/env.rb +5 -2
  17. data/examples/v8/features/fibonacci.feature +1 -1
  18. data/examples/watir/features/step_definitions/search_steps.rb +1 -1
  19. data/features/announce.feature +164 -0
  20. data/features/around_hooks.feature +232 -0
  21. data/features/background.feature +95 -284
  22. data/features/bug_371.feature +32 -0
  23. data/features/bug_464.feature +16 -0
  24. data/features/bug_475.feature +42 -0
  25. data/features/bug_585_tab_indentation.feature +22 -0
  26. data/features/bug_600.feature +67 -0
  27. data/features/call_steps_from_stepdefs.feature +154 -0
  28. data/features/cucumber_cli.feature +591 -0
  29. data/features/cucumber_cli_outlines.feature +117 -0
  30. data/features/custom_formatter.feature +73 -3
  31. data/features/default_snippets.feature +42 -0
  32. data/features/diffing.feature +25 -0
  33. data/features/drb_server_integration.feature +174 -0
  34. data/features/exception_in_after_block.feature +127 -0
  35. data/features/exception_in_after_step_block.feature +104 -0
  36. data/features/exception_in_before_block.feature +98 -0
  37. data/features/exclude_files.feature +20 -0
  38. data/features/expand.feature +60 -0
  39. data/features/html_formatter.feature +8 -0
  40. data/features/html_formatter/a.html +582 -0
  41. data/features/json_formatter.feature +245 -160
  42. data/features/junit_formatter.feature +88 -0
  43. data/features/language_from_header.feature +30 -0
  44. data/features/language_help.feature +78 -0
  45. data/features/listener_debugger_formatter.feature +42 -0
  46. data/features/multiline_names.feature +44 -0
  47. data/features/negative_tagged_hooks.feature +60 -0
  48. data/features/post_configuration_hook.feature +37 -0
  49. data/features/profiles.feature +126 -0
  50. data/features/rake_task.feature +152 -0
  51. data/features/report_called_undefined_steps.feature +34 -0
  52. data/features/rerun_formatter.feature +45 -0
  53. data/features/simplest.feature +11 -0
  54. data/features/snippet.feature +23 -0
  55. data/features/snippets_when_using_star_keyword.feature +36 -0
  56. data/features/step_definitions/cucumber_steps.rb +153 -7
  57. data/features/step_definitions/extra_steps.rb +2 -0
  58. data/features/step_definitions/simplest_steps.rb +3 -0
  59. data/features/step_definitions/wire_steps.rb +32 -0
  60. data/features/support/env.rb +140 -18
  61. data/features/support/env.rb.simplest +7 -0
  62. data/features/support/fake_wire_server.rb +77 -0
  63. data/features/table_diffing.feature +45 -0
  64. data/features/table_mapping.feature +34 -0
  65. data/features/tag_logic.feature +258 -0
  66. data/features/transform.feature +245 -0
  67. data/features/unicode_table.feature +35 -0
  68. data/features/usage_and_stepdefs_formatter.feature +169 -0
  69. data/features/wire_protocol.feature +332 -0
  70. data/features/wire_protocol_table_diffing.feature +119 -0
  71. data/features/wire_protocol_tags.feature +87 -0
  72. data/features/wire_protocol_timeouts.feature +63 -0
  73. data/features/work_in_progress.feature +156 -0
  74. data/fixtures/json/features/pystring.feature +8 -0
  75. data/fixtures/junit/features/pending.feature +1 -3
  76. data/fixtures/self_test/features/background/background_tagged_before_on_outline.feature +12 -0
  77. data/fixtures/self_test/features/background/background_with_name.feature +7 -0
  78. data/fixtures/self_test/features/background/failing_background.feature +12 -0
  79. data/fixtures/self_test/features/background/failing_background_after_success.feature +11 -0
  80. data/fixtures/self_test/features/background/multiline_args_background.feature +32 -0
  81. data/fixtures/self_test/features/background/passing_background.feature +10 -0
  82. data/fixtures/self_test/features/background/pending_background.feature +10 -0
  83. data/fixtures/self_test/features/background/scenario_outline_failing_background.feature +16 -0
  84. data/fixtures/self_test/features/background/scenario_outline_passing_background.feature +16 -0
  85. data/fixtures/self_test/features/support/env.rb +0 -8
  86. data/fixtures/tickets/features.html +1 -1
  87. data/gem_tasks/examples.rake +1 -1
  88. data/gem_tasks/features.rake +14 -0
  89. data/gem_tasks/sdoc.rake +12 -0
  90. data/lib/cucumber.rb +0 -12
  91. data/lib/cucumber/ast.rb +1 -1
  92. data/lib/cucumber/ast/background.rb +5 -21
  93. data/lib/cucumber/ast/examples.rb +4 -12
  94. data/lib/cucumber/ast/feature.rb +5 -13
  95. data/lib/cucumber/ast/feature_element.rb +4 -9
  96. data/lib/cucumber/ast/outline_table.rb +4 -4
  97. data/lib/cucumber/ast/py_string.rb +80 -0
  98. data/lib/cucumber/ast/scenario.rb +5 -7
  99. data/lib/cucumber/ast/scenario_outline.rb +15 -23
  100. data/lib/cucumber/ast/step.rb +0 -5
  101. data/lib/cucumber/ast/step_invocation.rb +15 -21
  102. data/lib/cucumber/ast/table.rb +8 -14
  103. data/lib/cucumber/ast/tree_walker.rb +48 -10
  104. data/lib/cucumber/cli/configuration.rb +8 -33
  105. data/lib/cucumber/cli/main.rb +35 -20
  106. data/lib/cucumber/cli/options.rb +7 -8
  107. data/lib/cucumber/cli/profile_loader.rb +0 -2
  108. data/lib/cucumber/core_ext/proc.rb +1 -2
  109. data/lib/cucumber/feature_file.rb +15 -47
  110. data/lib/cucumber/formatter/ansicolor.rb +5 -3
  111. data/lib/cucumber/formatter/color_io.rb +23 -0
  112. data/lib/cucumber/formatter/console.rb +23 -27
  113. data/lib/cucumber/formatter/cucumber.css +17 -34
  114. data/lib/cucumber/formatter/cucumber.sass +182 -173
  115. data/lib/cucumber/formatter/html.rb +11 -46
  116. data/lib/cucumber/formatter/io.rb +4 -2
  117. data/lib/cucumber/formatter/json.rb +152 -15
  118. data/lib/cucumber/formatter/json_pretty.rb +6 -5
  119. data/lib/cucumber/formatter/junit.rb +22 -28
  120. data/lib/cucumber/formatter/pdf.rb +6 -6
  121. data/lib/cucumber/formatter/pretty.rb +5 -5
  122. data/lib/cucumber/formatter/rerun.rb +11 -22
  123. data/lib/cucumber/formatter/tag_cloud.rb +35 -0
  124. data/lib/cucumber/formatter/unicode.rb +20 -41
  125. data/lib/cucumber/js_support/js_dsl.js +4 -4
  126. data/lib/cucumber/js_support/js_language.rb +5 -9
  127. data/lib/cucumber/js_support/js_snippets.rb +2 -2
  128. data/lib/cucumber/language_support.rb +2 -2
  129. data/lib/cucumber/parser/gherkin_builder.rb +30 -35
  130. data/lib/cucumber/platform.rb +8 -8
  131. data/lib/cucumber/py_support/py_language.rb +2 -2
  132. data/lib/cucumber/rake/task.rb +31 -74
  133. data/lib/cucumber/rb_support/rb_dsl.rb +0 -1
  134. data/lib/cucumber/rb_support/rb_language.rb +8 -10
  135. data/lib/cucumber/rb_support/rb_step_definition.rb +0 -8
  136. data/lib/cucumber/rb_support/rb_transform.rb +0 -17
  137. data/lib/cucumber/rb_support/rb_world.rb +18 -26
  138. data/lib/cucumber/rspec/doubles.rb +3 -3
  139. data/lib/cucumber/step_match.rb +2 -6
  140. data/lib/cucumber/step_mother.rb +427 -6
  141. data/lib/cucumber/wire_support/configuration.rb +1 -4
  142. data/lib/cucumber/wire_support/wire_language.rb +10 -3
  143. data/spec/cucumber/ast/background_spec.rb +6 -68
  144. data/spec/cucumber/ast/feature_factory.rb +4 -5
  145. data/spec/cucumber/ast/feature_spec.rb +4 -4
  146. data/spec/cucumber/ast/outline_table_spec.rb +1 -1
  147. data/spec/cucumber/ast/py_string_spec.rb +40 -0
  148. data/spec/cucumber/ast/scenario_outline_spec.rb +11 -15
  149. data/spec/cucumber/ast/scenario_spec.rb +4 -4
  150. data/spec/cucumber/ast/step_spec.rb +3 -3
  151. data/spec/cucumber/ast/table_spec.rb +2 -38
  152. data/spec/cucumber/ast/tree_walker_spec.rb +2 -2
  153. data/spec/cucumber/broadcaster_spec.rb +1 -1
  154. data/spec/cucumber/cli/configuration_spec.rb +6 -32
  155. data/spec/cucumber/cli/drb_client_spec.rb +3 -2
  156. data/spec/cucumber/cli/main_spec.rb +43 -43
  157. data/spec/cucumber/cli/options_spec.rb +1 -28
  158. data/spec/cucumber/cli/profile_loader_spec.rb +1 -1
  159. data/spec/cucumber/core_ext/proc_spec.rb +1 -1
  160. data/spec/cucumber/formatter/ansicolor_spec.rb +1 -1
  161. data/spec/cucumber/formatter/color_io_spec.rb +29 -0
  162. data/spec/cucumber/formatter/duration_spec.rb +1 -1
  163. data/spec/cucumber/formatter/html_spec.rb +5 -3
  164. data/spec/cucumber/formatter/junit_spec.rb +2 -16
  165. data/spec/cucumber/formatter/progress_spec.rb +1 -1
  166. data/spec/cucumber/formatter/spec_helper.rb +12 -11
  167. data/spec/cucumber/rb_support/rb_language_spec.rb +28 -241
  168. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +28 -33
  169. data/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +1 -1
  170. data/spec/cucumber/step_match_spec.rb +9 -11
  171. data/spec/cucumber/step_mother_spec.rb +302 -0
  172. data/spec/cucumber/wire_support/configuration_spec.rb +1 -1
  173. data/spec/cucumber/wire_support/connection_spec.rb +1 -1
  174. data/spec/cucumber/wire_support/wire_exception_spec.rb +1 -1
  175. data/spec/cucumber/wire_support/wire_language_spec.rb +1 -1
  176. data/spec/cucumber/wire_support/wire_packet_spec.rb +1 -1
  177. data/spec/cucumber/wire_support/wire_step_definition_spec.rb +1 -1
  178. data/spec/cucumber/world/pending_spec.rb +2 -2
  179. data/spec/spec_helper.rb +20 -13
  180. metadata +78 -4
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2008,2009,2010,2011 Aslak Hellesøy
3
+ Copyright (c) 2008,2009 Aslak Hellesøy
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
@@ -0,0 +1,26 @@
1
+ = Cucumber
2
+
3
+ The main website is at http://cukes.info/
4
+ The documentation is at http://wiki.github.com/aslakhellesoy/cucumber/
5
+
6
+ == Note on Patches/Pull Requests
7
+
8
+ * Fork the project.
9
+ * Make your feature addition or bug fix.
10
+ * Add tests for it. This is important so I don't break it in a
11
+ future version unintentionally.
12
+ * Commit, do not mess with Rakefile, version, or history.
13
+ (if you want to have your own version, that is fine but
14
+ bump version in a commit by itself I can ignore when I pull)
15
+ * Send me a pull request. Bonus points for topic branches.
16
+
17
+ == Running tests
18
+
19
+ rake
20
+
21
+ If you get errors about missing gems - just install them.
22
+
23
+ == Copyright
24
+
25
+ Copyright (c) 2008,2009 Aslak Hellesøy. See LICENSE for details.
26
+
data/Rakefile CHANGED
@@ -1,12 +1,58 @@
1
1
  # encoding: utf-8
2
2
  require 'rubygems'
3
- require 'bundler'
4
- Bundler::GemHelper.install_tasks
5
-
3
+ require 'term/ansicolor'
4
+ require 'rake'
6
5
  $:.unshift(File.dirname(__FILE__) + '/lib')
6
+ require 'cucumber/formatter/ansicolor'
7
+ require 'cucumber/platform'
8
+
9
+ begin
10
+ require 'jeweler'
11
+ Jeweler::Tasks.new do |gem|
12
+ gem.name = "cucumber"
13
+ gem.summary = %Q{Behaviour Driven Development with elegance and joy}
14
+ gem.description = %Q{Behaviour Driven Development with elegance and joy}
15
+ gem.email = "cukes@googlegroups.com"
16
+ gem.homepage = "http://cukes.info"
17
+ gem.authors = ["Aslak Hellesøy"]
18
+
19
+ gem.add_dependency 'gherkin', '~> 2.1.4'
20
+ gem.add_dependency 'term-ansicolor', '~> 1.0.4'
21
+ gem.add_dependency 'builder', '~> 2.1.2'
22
+ gem.add_dependency 'diff-lcs', '~> 1.1.2'
23
+ gem.add_dependency 'json_pure', '~> 1.4.3'
24
+
25
+ gem.add_development_dependency 'nokogiri', '~> 1.4.2'
26
+ gem.add_development_dependency 'prawn', '= 0.8.4'
27
+ gem.add_development_dependency 'prawn-layout', '= 0.8.4'
28
+ gem.add_development_dependency 'rspec', '~> 2.0.0.beta.15'
29
+ gem.add_development_dependency 'syntax', '~> 1.0.0'
30
+ gem.add_development_dependency 'spork', '~> 0.8.4' unless Cucumber::JRUBY || Cucumber::WINDOWS
31
+
32
+ extend Cucumber::Formatter::ANSIColor
33
+ gem.post_install_message = <<-POST_INSTALL_MESSAGE
34
+
35
+ #{cukes(15)}
36
+
37
+ #{cukes(1)} U P G R A D I N G #{cukes(1)}
38
+
39
+ Thank you for installing cucumber-#{Cucumber::VERSION}.
40
+ Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
41
+ for important information about this release. Happy cuking!
42
+
43
+ #{cukes(15)}
44
+
45
+ POST_INSTALL_MESSAGE
46
+ end
47
+
48
+ Jeweler::GemcutterTasks.new
49
+ rescue LoadError
50
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
51
+ end
52
+
7
53
  Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
8
54
 
9
- task :default => [:spec, :cucumber]
55
+ task :default => [:check_dependencies, :spec, :cucumber]
10
56
 
11
57
  require 'rake/clean'
12
- CLEAN.include %w(**/*.{log,pyc,rbc,tgz} doc)
58
+ CLEAN.include %w(**/*.{log,pyc})
@@ -0,0 +1,5 @@
1
+ ---
2
+ :patch: 7
3
+ :build:
4
+ :major: 0
5
+ :minor: 8
@@ -1,18 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
  $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
3
3
 
4
- if(ENV['SIMPLECOV'] && RUBY_VERSION =~ /1\.9/)
5
- require 'simplecov'
6
- SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/..'))
7
- SimpleCov.start
8
- end
9
-
10
4
  require 'cucumber/rspec/disable_option_parser'
11
5
  require 'cucumber/cli/main'
12
6
  begin
13
7
  # The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
14
8
  failure = Cucumber::Cli::Main.execute(ARGV.dup)
15
- Kernel.exit(1) if failure
9
+ Kernel.exit(failure ? 1 : 0)
16
10
  rescue SystemExit => e
17
11
  Kernel.exit(e.status)
18
12
  rescue Exception => e
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cucumber}
8
- s.version = "0.8.6"
8
+ s.version = "0.8.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aslak Helles\303\270y"]
@@ -15,13 +15,18 @@ Gem::Specification.new do |s|
15
15
  s.email = %q{cukes@googlegroups.com}
16
16
  s.executables = ["cucumber"]
17
17
  s.extra_rdoc_files = [
18
- "LICENSE"
18
+ "LICENSE",
19
+ "README.rdoc"
19
20
  ]
20
21
  s.files = [
21
22
  ".gitattributes",
22
23
  ".rspec",
24
+ "Caliper.yml",
25
+ "History.txt",
23
26
  "LICENSE",
27
+ "README.rdoc",
24
28
  "Rakefile",
29
+ "VERSION.yml",
25
30
  "bin/cucumber",
26
31
  "cucumber.gemspec",
27
32
  "cucumber.yml",
@@ -156,6 +161,7 @@ Gem::Specification.new do |s|
156
161
  "examples/i18n/pt/lib/calculadora.rb",
157
162
  "examples/i18n/ro/Rakefile",
158
163
  "examples/i18n/ro/features/step_definitons/calculator_steps.rb",
164
+ "examples/i18n/ro/features/suma.feature",
159
165
  "examples/i18n/ro/lib/calculator.rb",
160
166
  "examples/i18n/ru/Rakefile",
161
167
  "examples/i18n/ru/features/addition.feature",
@@ -271,14 +277,65 @@ Gem::Specification.new do |s|
271
277
  "examples/watir/features/step_definitions/search_steps.rb",
272
278
  "examples/watir/features/support/env.rb",
273
279
  "examples/watir/features/support/screenshots.rb",
280
+ "features/announce.feature",
281
+ "features/around_hooks.feature",
274
282
  "features/background.feature",
283
+ "features/bug_371.feature",
284
+ "features/bug_464.feature",
285
+ "features/bug_475.feature",
286
+ "features/bug_585_tab_indentation.feature",
287
+ "features/bug_600.feature",
288
+ "features/call_steps_from_stepdefs.feature",
289
+ "features/cucumber_cli.feature",
290
+ "features/cucumber_cli_outlines.feature",
275
291
  "features/custom_formatter.feature",
292
+ "features/default_snippets.feature",
293
+ "features/diffing.feature",
294
+ "features/drb_server_integration.feature",
295
+ "features/exception_in_after_block.feature",
296
+ "features/exception_in_after_step_block.feature",
297
+ "features/exception_in_before_block.feature",
298
+ "features/exclude_files.feature",
299
+ "features/expand.feature",
300
+ "features/html_formatter.feature",
301
+ "features/html_formatter/a.html",
276
302
  "features/json_formatter.feature",
303
+ "features/junit_formatter.feature",
304
+ "features/language_from_header.feature",
305
+ "features/language_help.feature",
306
+ "features/listener_debugger_formatter.feature",
307
+ "features/multiline_names.feature",
308
+ "features/negative_tagged_hooks.feature",
309
+ "features/post_configuration_hook.feature",
310
+ "features/profiles.feature",
311
+ "features/rake_task.feature",
312
+ "features/report_called_undefined_steps.feature",
313
+ "features/rerun_formatter.feature",
314
+ "features/simplest.feature",
315
+ "features/snippet.feature",
316
+ "features/snippets_when_using_star_keyword.feature",
277
317
  "features/step_definitions/cucumber_steps.rb",
318
+ "features/step_definitions/extra_steps.rb",
319
+ "features/step_definitions/simplest_steps.rb",
320
+ "features/step_definitions/wire_steps.rb",
278
321
  "features/support/env.rb",
322
+ "features/support/env.rb.simplest",
323
+ "features/support/fake_wire_server.rb",
324
+ "features/table_diffing.feature",
325
+ "features/table_mapping.feature",
326
+ "features/tag_logic.feature",
327
+ "features/transform.feature",
328
+ "features/unicode_table.feature",
329
+ "features/usage_and_stepdefs_formatter.feature",
330
+ "features/wire_protocol.feature",
331
+ "features/wire_protocol_table_diffing.feature",
332
+ "features/wire_protocol_tags.feature",
333
+ "features/wire_protocol_timeouts.feature",
334
+ "features/work_in_progress.feature",
279
335
  "fixtures/json/features/background.feature",
280
336
  "fixtures/json/features/embed.feature",
281
337
  "fixtures/json/features/one_passing_one_failing.feature",
338
+ "fixtures/json/features/pystring.feature",
282
339
  "fixtures/json/features/step_definitions/steps.rb",
283
340
  "fixtures/json/features/tables.feature",
284
341
  "fixtures/junit/features/one_passing_one_failing.feature",
@@ -287,6 +344,15 @@ Gem::Specification.new do |s|
287
344
  "fixtures/self_test/.gitignore",
288
345
  "fixtures/self_test/README.textile",
289
346
  "fixtures/self_test/Rakefile",
347
+ "fixtures/self_test/features/background/background_tagged_before_on_outline.feature",
348
+ "fixtures/self_test/features/background/background_with_name.feature",
349
+ "fixtures/self_test/features/background/failing_background.feature",
350
+ "fixtures/self_test/features/background/failing_background_after_success.feature",
351
+ "fixtures/self_test/features/background/multiline_args_background.feature",
352
+ "fixtures/self_test/features/background/passing_background.feature",
353
+ "fixtures/self_test/features/background/pending_background.feature",
354
+ "fixtures/self_test/features/background/scenario_outline_failing_background.feature",
355
+ "fixtures/self_test/features/background/scenario_outline_passing_background.feature",
290
356
  "fixtures/self_test/features/call_undefined_step_from_step_def.feature",
291
357
  "fixtures/self_test/features/failing_expectation.feature",
292
358
  "fixtures/self_test/features/lots_of_undefined.feature",
@@ -343,10 +409,12 @@ Gem::Specification.new do |s|
343
409
  "gem_tasks/contributors.rake",
344
410
  "gem_tasks/environment.rake",
345
411
  "gem_tasks/examples.rake",
412
+ "gem_tasks/features.rake",
346
413
  "gem_tasks/fix_cr_lf.rake",
347
414
  "gem_tasks/flog.rake",
348
415
  "gem_tasks/rspec.rake",
349
416
  "gem_tasks/sass.rake",
417
+ "gem_tasks/sdoc.rake",
350
418
  "lib/README.rdoc",
351
419
  "lib/autotest/cucumber.rb",
352
420
  "lib/autotest/cucumber_mixin.rb",
@@ -365,6 +433,7 @@ Gem::Specification.new do |s|
365
433
  "lib/cucumber/ast/feature_element.rb",
366
434
  "lib/cucumber/ast/features.rb",
367
435
  "lib/cucumber/ast/outline_table.rb",
436
+ "lib/cucumber/ast/py_string.rb",
368
437
  "lib/cucumber/ast/scenario.rb",
369
438
  "lib/cucumber/ast/scenario_outline.rb",
370
439
  "lib/cucumber/ast/step.rb",
@@ -386,6 +455,7 @@ Gem::Specification.new do |s|
386
455
  "lib/cucumber/core_ext/string.rb",
387
456
  "lib/cucumber/feature_file.rb",
388
457
  "lib/cucumber/formatter/ansicolor.rb",
458
+ "lib/cucumber/formatter/color_io.rb",
389
459
  "lib/cucumber/formatter/console.rb",
390
460
  "lib/cucumber/formatter/cucumber.css",
391
461
  "lib/cucumber/formatter/cucumber.sass",
@@ -405,6 +475,7 @@ Gem::Specification.new do |s|
405
475
  "lib/cucumber/formatter/stepdefs.rb",
406
476
  "lib/cucumber/formatter/steps.rb",
407
477
  "lib/cucumber/formatter/summary.rb",
478
+ "lib/cucumber/formatter/tag_cloud.rb",
408
479
  "lib/cucumber/formatter/unicode.rb",
409
480
  "lib/cucumber/formatter/usage.rb",
410
481
  "lib/cucumber/js_support/js_dsl.js",
@@ -445,6 +516,7 @@ Gem::Specification.new do |s|
445
516
  "spec/cucumber/ast/feature_factory.rb",
446
517
  "spec/cucumber/ast/feature_spec.rb",
447
518
  "spec/cucumber/ast/outline_table_spec.rb",
519
+ "spec/cucumber/ast/py_string_spec.rb",
448
520
  "spec/cucumber/ast/scenario_outline_spec.rb",
449
521
  "spec/cucumber/ast/scenario_spec.rb",
450
522
  "spec/cucumber/ast/step_spec.rb",
@@ -458,6 +530,7 @@ Gem::Specification.new do |s|
458
530
  "spec/cucumber/cli/profile_loader_spec.rb",
459
531
  "spec/cucumber/core_ext/proc_spec.rb",
460
532
  "spec/cucumber/formatter/ansicolor_spec.rb",
533
+ "spec/cucumber/formatter/color_io_spec.rb",
461
534
  "spec/cucumber/formatter/duration_spec.rb",
462
535
  "spec/cucumber/formatter/html_spec.rb",
463
536
  "spec/cucumber/formatter/junit_spec.rb",
@@ -468,6 +541,7 @@ Gem::Specification.new do |s|
468
541
  "spec/cucumber/rb_support/regexp_argument_matcher_spec.rb",
469
542
  "spec/cucumber/sell_cucumbers.feature",
470
543
  "spec/cucumber/step_match_spec.rb",
544
+ "spec/cucumber/step_mother_spec.rb",
471
545
  "spec/cucumber/wire_support/configuration_spec.rb",
472
546
  "spec/cucumber/wire_support/connection_spec.rb",
473
547
  "spec/cucumber/wire_support/wire_exception_spec.rb",
@@ -483,7 +557,7 @@ Gem::Specification.new do |s|
483
557
 
484
558
  (::) U P G R A D I N G (::)
485
559
 
486
- Thank you for installing cucumber-0.8.6.
560
+ Thank you for installing cucumber-0.8.7.
487
561
  Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
488
562
  for important information about this release. Happy cuking!
489
563
 
@@ -15,7 +15,7 @@ Given "كتابة $n في الآلة الحاسبة" do |n|
15
15
  @calc.push n.to_i
16
16
  end
17
17
 
18
- When /يتم الضغط على (.+)/ do |op|
18
+ When /يتم الضغط على (\w+)/ do |op|
19
19
  @result = @calc.send op
20
20
  end
21
21
 
@@ -15,7 +15,7 @@ Given /שהזנתי (\d+) למחשבון/ do |n|
15
15
  @calc.push n.to_i
16
16
  end
17
17
 
18
- When /אני לוחץ על (.+)/ do |op|
18
+ When /אני לוחץ על (\w+)/ do |op|
19
19
  @result = @calc.send op
20
20
  end
21
21
 
@@ -4,18 +4,21 @@ require 'cucumber/formatter/unicode'
4
4
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
5
  require 'calculator'
6
6
 
7
- Datfiind /un calculator/ do
7
+ Before do
8
8
  @calc = Calculator.new
9
9
  end
10
10
 
11
- Cand /introduc (\d+)/ do |n|
11
+ After do
12
+ end
13
+
14
+ Given /introduc (\d+)/ do |n|
12
15
  @calc.push n.to_i
13
16
  end
14
17
 
15
- Cand 'apăs tasta Egal' do
18
+ When 'apas suma' do
16
19
  @result = @calc.add
17
20
  end
18
21
 
19
- Atunci /ecranul trebuie afişeze (\d*)/ do |result|
22
+ Then /rezultatul trebuie sa fie (\d*)/ do |result|
20
23
  @result.should == result.to_i
21
24
  end
@@ -0,0 +1,11 @@
1
+ # language: ro
2
+ Functionalitate: suma
3
+ Pentru a nu face erori stupide
4
+ Ca utilizator
5
+ Vreau sa stiu suma a doua numere
6
+
7
+ Scenariu: suma a doua numere
8
+ Daca introduc 5
9
+ Si apoi introduc 7
10
+ Cand apas suma
11
+ Atunci rezultatul trebuie sa fie 12
@@ -1,5 +1,5 @@
1
1
  # language: ru
2
- Функция: Деление чисел
2
+ Фича: Деление чисел
3
3
  Поскольку деление сложный процесс и люди часто допускают ошибки
4
4
  Нужно дать им возможность делить на калькуляторе
5
5
 
@@ -9,7 +9,7 @@
9
9
  Если я нажимаю "/"
10
10
  То результатом должно быть число <частное>
11
11
 
12
- Примеры:
12
+ Значения:
13
13
  | делимое | делитель | частное |
14
14
  | 100 | 2 | 50 |
15
15
  | 28 | 7 | 4 |
@@ -11,14 +11,14 @@ end
11
11
  After do
12
12
  end
13
13
 
14
- Diyelimki /hesap makinesine (\d+) girdim/ do |n|
14
+ Given /hesap makinesine (\d+) girdim/ do |n|
15
15
  @calc.push n.to_i
16
16
  end
17
17
 
18
- Eğerki /(.*) tuşuna basarsam/ do |op|
18
+ When /(\w+) tuşuna basarsam/ do |op|
19
19
  @result = @calc.send op
20
20
  end
21
21
 
22
- Ozaman /ekrandaki sonuç (.*) olmalı/ do |result|
22
+ Then /ekrandaki sonuç (.*) olmalı/ do |result|
23
23
  @result.should == result.to_f
24
24
  end
@@ -1,7 +1,10 @@
1
- # See http://wiki.github.com/cucumber/cucumber/sinatra
1
+ # See http://wiki.github.com/aslakhellesoy/cucumber/sinatra
2
2
  # for more details about Sinatra with Cucumber
3
3
 
4
- require File.dirname(__FILE__) + '/../../app'
4
+ app_file = File.join(File.dirname(__FILE__), *%w[.. .. app.rb])
5
+ require app_file
6
+ # Force the application name because polyglot breaks the auto-detection logic.
7
+ Sinatra::Application.app_file = app_file
5
8
 
6
9
  begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
7
10
  require 'rack/test'
@@ -17,7 +17,7 @@ Feature: Fibonacci
17
17
  | 9 | [1, 1, 2, 3, 5, 8] |
18
18
  | 100 | [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] |
19
19
 
20
- Scenario: Single series tested via a DocString
20
+ Scenario: Single series tested via a PyString
21
21
  When I ask Javascript to calculate fibonacci up to 2 with formatting
22
22
  Then it should give me:
23
23
  """
@@ -16,7 +16,7 @@ end
16
16
 
17
17
  # To avoid step definitions that are tightly coupled to your user interface,
18
18
  # consider creating classes for your pages - such as this:
19
- # http://github.com/cucumber/cucumber/tree/v0.1.15/examples/watir/features/step_definitons/search_steps.rb
19
+ # http://github.com/aslakhellesoy/cucumber/tree/v0.1.15/examples/watir/features/step_definitons/search_steps.rb
20
20
  #
21
21
  # You may keep the page classes along your steps, or even better, put them in separate files, e.g.
22
22
  # support/pages/google_search.rb
@@ -0,0 +1,164 @@
1
+ Feature: Delayed announcement
2
+
3
+ Background:
4
+ Given a standard Cucumber project directory structure
5
+ And a file named "features/step_definitions/steps.rb" with:
6
+ """
7
+ Given /^I use announce with text "(.*)"$/ do |ann| x=1
8
+ announce(ann)
9
+ end
10
+
11
+ Given /^I use multiple announces$/ do x=1
12
+ announce("Multiple")
13
+ announce(["Announce","Me"])
14
+ end
15
+
16
+ Given /^I use announcement (.+) in line (.+) (?:with result (.+))$/ do |ann, line, result| x=1
17
+ announce("Last announcement") if line == "3"
18
+ announce("Line: #{line}: #{ann}")
19
+ fail if result =~ /fail/i
20
+ end
21
+
22
+ Given /^I use announce and step fails$/ do x=1
23
+ announce("Announce with fail")
24
+ fail
25
+ end
26
+
27
+ Given /^this step works$/ do x=1
28
+ end
29
+
30
+ Given /^I announce the world$/ do x=1
31
+ announce_world
32
+ end
33
+ """
34
+ And a file named "features/f.feature" with:
35
+ """
36
+ Feature: F
37
+
38
+ Scenario: S
39
+ Given I use announce with text "Ann"
40
+ And this step works
41
+
42
+ Scenario: S2
43
+ Given I use multiple announces
44
+ And this step works
45
+
46
+ Scenario Outline: S3
47
+ Given I use announcement <ann> in line <line>
48
+
49
+ Examples:
50
+ | line | ann |
51
+ | 1 | anno1 |
52
+ | 2 | anno2 |
53
+ | 3 | anno3 |
54
+
55
+ Scenario: S4
56
+ Given I use announce and step fails
57
+ And this step works
58
+
59
+ Scenario Outline: s5
60
+ Given I use announcement <ann> in line <line> with result <result>
61
+
62
+ Examples:
63
+ | line | ann | result |
64
+ | 1 | anno1 | fail |
65
+ | 2 | anno2 | pass |
66
+ """
67
+
68
+ And a file named "features/announce_world.feature" with:
69
+ """
70
+ Feature: announce_world
71
+ Scenario: announce_world
72
+ Given I announce the world
73
+ """
74
+
75
+ Scenario: Delayed announcements feature
76
+ When I run cucumber --format pretty features/f.feature
77
+ Then STDERR should be empty
78
+ And the output should contain
79
+ """
80
+ Feature: F
81
+
82
+ Scenario: S # features/f.feature:3
83
+ Given I use announce with text "Ann" # features/step_definitions/steps.rb:1
84
+ Ann
85
+ And this step works # features/step_definitions/steps.rb:21
86
+
87
+ Scenario: S2 # features/f.feature:7
88
+ Given I use multiple announces # features/step_definitions/steps.rb:5
89
+ Multiple
90
+ Announce
91
+ Me
92
+ And this step works # features/step_definitions/steps.rb:21
93
+
94
+ Scenario Outline: S3 # features/f.feature:11
95
+ Given I use announcement <ann> in line <line> # features/f.feature:12
96
+
97
+ Examples:
98
+ | line | ann |
99
+ | 1 | anno1 |
100
+ | 2 | anno2 |
101
+ | 3 | anno3 |
102
+
103
+ Scenario: S4 # features/f.feature:20
104
+ Given I use announce and step fails # features/step_definitions/steps.rb:16
105
+ Announce with fail
106
+ (RuntimeError)
107
+ ./features/step_definitions/steps.rb:18:in `/^I use announce and step fails$/'
108
+ features/f.feature:21:in `Given I use announce and step fails'
109
+ And this step works # features/step_definitions/steps.rb:21
110
+
111
+ Scenario Outline: s5 # features/f.feature:24
112
+ Given I use announcement <ann> in line <line> with result <result> # features/step_definitions/steps.rb:10
113
+
114
+ Examples:
115
+ | line | ann | result |
116
+ | 1 | anno1 | fail | Line: 1: anno1
117
+ (RuntimeError)
118
+ ./features/step_definitions/steps.rb:13:in `/^I use announcement (.+) in line (.+) (?:with result (.+))$/'
119
+ features/f.feature:25:in `Given I use announcement <ann> in line <line> with result <result>'
120
+ | 2 | anno2 | pass | Line: 2: anno2
121
+ """
122
+
123
+ Scenario: Non-delayed announcements feature (progress formatter)
124
+ When I run cucumber --format progress features/f.feature
125
+ Then the output should contain
126
+ """
127
+ Ann
128
+ ..
129
+ Multiple
130
+
131
+ Announce
132
+ Me
133
+ ..-UUUUUU
134
+ Announce with fail
135
+ F--
136
+ Line: 1: anno1
137
+ FFF
138
+ Line: 2: anno2
139
+ ...
140
+ """
141
+
142
+ @rspec2
143
+ Scenario: announce world
144
+ When I run cucumber --format progress features/announce_world.feature
145
+ Then the output should contain
146
+ """
147
+ WORLD:
148
+ Object
149
+
150
+ RSpec::Matchers
151
+ Cucumber::RbSupport::RbWorld
152
+ """
153
+
154
+ @rspec1
155
+ Scenario: announce world
156
+ When I run cucumber --format progress features/announce_world.feature
157
+ Then the output should contain
158
+ """
159
+ WORLD:
160
+ Object
161
+
162
+ Spec::Matchers
163
+ Cucumber::RbSupport::RbWorld
164
+ """