cucumber 3.0.0.pre.2 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +32 -0
  3. data/.github/ISSUE_TEMPLATE.md +1 -1
  4. data/.github/PULL_REQUEST_TEMPLATE.md +1 -0
  5. data/.rubocop_todo.yml +1 -85
  6. data/.travis.yml +3 -2
  7. data/{History.md → CHANGELOG.md} +77 -13
  8. data/appveyor.yml +2 -1
  9. data/bin/cucumber +2 -1
  10. data/cucumber.gemspec +2 -2
  11. data/examples/i18n/ar/features/step_definitions/calculator_steps.rb +6 -1
  12. data/examples/i18n/bg/features/support/env.rb +6 -1
  13. data/examples/i18n/bg/lib/calculator.rb +2 -1
  14. data/examples/i18n/ca/features/step_definitions/calculator_steps.rb +6 -1
  15. data/examples/i18n/cs/features/step_definitions/calculator_steps.rb +6 -1
  16. data/examples/i18n/da/features/step_definitions/lommeregner_steps.rb +6 -1
  17. data/examples/i18n/de/features/step_definitions/calculator_steps.rb +6 -1
  18. data/examples/i18n/el/features/step_definitions/calculator_steps.rb +6 -1
  19. data/examples/i18n/en-lol/features/support/env.rb +6 -2
  20. data/examples/i18n/en/features/step_definitions/calculator_steps.rb +6 -1
  21. data/examples/i18n/eo/features/step_definitions/calculator_steps.rb +6 -1
  22. data/examples/i18n/es/features/step_definitions/calculador_steps.rb +6 -1
  23. data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +6 -1
  24. data/examples/i18n/fi/features/step_definitions/laskin_steps.rb +6 -1
  25. data/examples/i18n/fr/features/support/env.rb +6 -1
  26. data/examples/i18n/he/features/step_definitions/calculator_steps.rb +6 -1
  27. data/examples/i18n/hi/features/step_definitions/calculator_steps.rb +6 -1
  28. data/examples/i18n/ht/features/step_definitions/kalkilatris_steps.rb +6 -2
  29. data/examples/i18n/hu/features/step_definitions/calculator_steps.rb +6 -1
  30. data/examples/i18n/id/features/step_definitions/calculator_steps.rb +6 -1
  31. data/examples/i18n/it/features/step_definitions/calcolatrice_steps.rb +6 -1
  32. data/examples/i18n/ja/features/support/env.rb +6 -1
  33. data/examples/i18n/ko/features/step_definitions/calculator_steps.rb +6 -1
  34. data/examples/i18n/lt/features/step_definitions/calculator_steps.rb +6 -1
  35. data/examples/i18n/lv/features/step_definitions/calculator_steps.rb +6 -1
  36. data/examples/i18n/no/features/support/env.rb +6 -1
  37. data/examples/i18n/pl/features/step_definitions/calculator_steps.rb +6 -1
  38. data/examples/i18n/pl/features/support/env.rb +6 -1
  39. data/examples/i18n/pt/features/support/env.rb +6 -1
  40. data/examples/i18n/ro/features/step_definitions/calculator_steps.rb +6 -1
  41. data/examples/i18n/ru/features/support/env.rb +6 -1
  42. data/examples/i18n/ru/lib/calculator.rb +2 -1
  43. data/examples/i18n/sk/features/step_definitions/calculator_steps.rb +6 -1
  44. data/examples/i18n/sr-Cyrl/features/support/env.rb +6 -1
  45. data/examples/i18n/sr-Latn/features/step_definitions/calculator_steps.rb +6 -1
  46. data/examples/i18n/sv/features/step_definitions/kalkulator_steps.rb +6 -1
  47. data/examples/i18n/tr/features/step_definitions/hesap_makinesi_adimlari.rb +6 -1
  48. data/examples/i18n/uk/features/support/env.rb +6 -1
  49. data/examples/i18n/uk/lib/calculator.rb +2 -1
  50. data/examples/i18n/uz/features/support/env.rb +6 -1
  51. data/examples/i18n/uz/lib/calculator.rb +2 -1
  52. data/examples/i18n/zh-CN/features/step_definitions/calculator_steps.rb +6 -1
  53. data/examples/i18n/zh-TW/features/step_definitions/calculator_steps.rb +6 -1
  54. data/examples/sinatra/features/support/env.rb +6 -1
  55. data/examples/tcl/features/support/env.rb +2 -1
  56. data/examples/watir/features/step_definitions/search_steps.rb +4 -3
  57. data/examples/watir/features/support/env.rb +5 -1
  58. data/features/docs/api/listen_for_events.feature +2 -2
  59. data/features/docs/cli/execute_with_tag_filter.feature +4 -2
  60. data/features/docs/defining_steps/ambiguous_steps.feature +89 -0
  61. data/features/docs/events/{test_case_starting_event.feature → test_case_started_event.feature} +3 -3
  62. data/features/docs/events/{test_run_starting_event.feature → test_run_started_event.feature} +5 -5
  63. data/features/docs/events/test_step_finished_event.feature +1 -1
  64. data/features/docs/events/{test_step_starting_event.feature → test_step_started_event.feature} +3 -3
  65. data/features/docs/extending_cucumber/custom_formatter.feature +5 -33
  66. data/features/docs/gherkin/outlines.feature +2 -4
  67. data/features/docs/writing_support_code/parameter_types.feature +12 -18
  68. data/features/lib/step_definitions/iso-8859-1_steps.rb +6 -3
  69. data/features/lib/support/fake_wire_server.rb +9 -1
  70. data/features/lib/support/parameter_types.rb +1 -4
  71. data/gem_tasks/fix_cr_lf.rake +17 -6
  72. data/lib/autotest/cucumber_mixin.rb +1 -1
  73. data/lib/cucumber/cli/configuration.rb +2 -2
  74. data/lib/cucumber/cli/options.rb +62 -41
  75. data/lib/cucumber/cli/profile_loader.rb +1 -1
  76. data/lib/cucumber/configuration.rb +3 -2
  77. data/lib/cucumber/deprecate.rb +2 -2
  78. data/lib/cucumber/events.rb +3 -3
  79. data/lib/cucumber/events/test_case_finished.rb +1 -1
  80. data/lib/cucumber/events/{test_case_starting.rb → test_case_started.rb} +1 -1
  81. data/lib/cucumber/events/{test_run_starting.rb → test_run_started.rb} +1 -1
  82. data/lib/cucumber/events/{test_step_starting.rb → test_step_started.rb} +1 -1
  83. data/lib/cucumber/filters.rb +1 -1
  84. data/lib/cucumber/filters/activate_steps.rb +6 -2
  85. data/lib/cucumber/filters/{broadcast_test_run_starting_event.rb → broadcast_test_run_started_event.rb} +2 -2
  86. data/lib/cucumber/formatter/console.rb +1 -1
  87. data/lib/cucumber/formatter/console_issues.rb +2 -2
  88. data/lib/cucumber/formatter/fail_fast.rb +1 -1
  89. data/lib/cucumber/formatter/html.rb +9 -10
  90. data/lib/cucumber/formatter/html_builder.rb +21 -11
  91. data/lib/cucumber/formatter/io.rb +1 -1
  92. data/lib/cucumber/formatter/json.rb +13 -12
  93. data/lib/cucumber/formatter/junit.rb +7 -7
  94. data/lib/cucumber/formatter/legacy_api/adapter.rb +30 -14
  95. data/lib/cucumber/formatter/legacy_api/ast.rb +10 -2
  96. data/lib/cucumber/formatter/progress.rb +2 -2
  97. data/lib/cucumber/formatter/rerun.rb +1 -1
  98. data/lib/cucumber/formatter/summary.rb +1 -1
  99. data/lib/cucumber/glue/dsl.rb +11 -25
  100. data/lib/cucumber/glue/proto_world.rb +0 -5
  101. data/lib/cucumber/hooks.rb +4 -4
  102. data/lib/cucumber/multiline_argument.rb +3 -11
  103. data/lib/cucumber/multiline_argument/data_table.rb +5 -3
  104. data/lib/cucumber/project_initializer.rb +1 -1
  105. data/lib/cucumber/rake/task.rb +8 -4
  106. data/lib/cucumber/runtime.rb +2 -2
  107. data/lib/cucumber/runtime/support_code.rb +1 -1
  108. data/lib/cucumber/runtime/user_interface.rb +5 -5
  109. data/lib/cucumber/step_match.rb +13 -0
  110. data/lib/cucumber/version +1 -1
  111. data/scripts/{update-history → update-changelog} +14 -11
  112. data/spec/cucumber/cli/configuration_spec.rb +13 -1
  113. data/spec/cucumber/cli/options_spec.rb +1 -1
  114. data/spec/cucumber/filters/activate_steps_spec.rb +4 -4
  115. data/spec/cucumber/formatter/fail_fast_spec.rb +1 -1
  116. data/spec/cucumber/formatter/html_spec.rb +1 -1
  117. data/spec/cucumber/formatter/json_spec.rb +26 -51
  118. data/spec/cucumber/formatter/junit_spec.rb +4 -4
  119. data/spec/cucumber/formatter/legacy_api/adapter_spec.rb +86 -98
  120. data/spec/cucumber/formatter/pretty_spec.rb +0 -13
  121. data/spec/cucumber/glue/snippet_spec.rb +2 -2
  122. data/spec/cucumber/hooks_spec.rb +2 -2
  123. data/spec/cucumber/multiline_argument/data_table_spec.rb +10 -5
  124. data/spec/cucumber/rake/forked_spec.rb +15 -11
  125. data/spec/cucumber/world/pending_spec.rb +1 -1
  126. data/spec/support/standard_step_actions.rb +1 -1
  127. metadata +25 -25
  128. data/features/docs/formatters/formatter_step_file_colon_line.feature +0 -44
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculador'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'kalkulaator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'laskin'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculatrice'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,6 +1,10 @@
1
-
2
1
  # encoding: utf-8
3
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
4
8
  require 'cucumber/formatter/unicode'
5
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
6
10
  require 'kalkilatris'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calcolatrice'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
 
5
10
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculadora'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -18,7 +18,8 @@ class Calculator
18
18
  end
19
19
 
20
20
  def /
21
- divisor, dividend = [@stack.pop, @stack.pop] # Hm, @stack.pop(2) doesn't work
21
+ divisor, dividend = [@stack.pop, @stack.pop]
22
+ # Hm, @stack.pop(2) doesn't work
22
23
  @stack.push dividend / divisor
23
24
  end
24
25
  end
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'kalkulator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'hesap_makinesi'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -18,7 +18,8 @@ class Calculator
18
18
  end
19
19
 
20
20
  def /
21
- divisor, dividend = [@stack.pop, @stack.pop] # Hm, @stack.pop(2) doesn't work
21
+ divisor, dividend = [@stack.pop, @stack.pop]
22
+ # Hm, @stack.pop(2) doesn't work
22
23
  @stack.push dividend / divisor
23
24
  end
24
25
  end
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -18,7 +18,8 @@ class Calculator
18
18
  end
19
19
 
20
20
  def /
21
- divisor, dividend = [@stack.pop, @stack.pop] # Hm, @stack.pop(2) doesn't work
21
+ divisor, dividend = [@stack.pop, @stack.pop]
22
+ # Hm, @stack.pop(2) doesn't work
22
23
  @stack.push dividend / divisor
23
24
  end
24
25
  end
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -1,5 +1,10 @@
1
1
  # encoding: utf-8
2
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ begin
3
+ require 'rspec/expectations'
4
+ rescue LoadError
5
+ require 'spec/expectations'
6
+ end
7
+
3
8
  require 'cucumber/formatter/unicode'
4
9
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
10
  require 'calculator'
@@ -3,7 +3,12 @@
3
3
 
4
4
  require File.dirname(__FILE__) + '/../../app'
5
5
 
6
- begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
6
+ begin
7
+ require 'rspec/expectations'
8
+ rescue LoadError
9
+ require 'spec/expectations'
10
+ end
11
+
7
12
  require 'rack/test'
8
13
  require 'capybara/cucumber'
9
14