aslakhellesoy-cucumber 0.3.7.4 → 0.3.7.5

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.
@@ -3,7 +3,7 @@
3
3
  === New Features
4
4
  * Rails cucumber generator sets up default gem dependencies in cucumber environment.
5
5
  * Better error if RSpec's option parser is "accidentally" loaded. (Aslak Hellesøy)
6
- * Most formatters now report how long a run took (#228 Aslak Hellesøy)
6
+ * The duration of a run is reported by formatters - same format as the Linux time command (#228 Aslak Hellesøy)
7
7
  * Scenario and ExampleRow objects (passed to Before and After hooks) have #name and #line methods (#316 Aslak Hellesøy)
8
8
  * Rails generator creates a cucumber environment file to avoid potential cache_classes conflicts in test.rb (#165, Ben Mabey)
9
9
  * HTML formatter renders @tags (but the CSS is still ugly)
@@ -12,6 +12,7 @@
12
12
  * The Cucumber Rake task will again fork by default (as before 0.3.4). Forking must be turned off explicitly. (Aslak Hellesøy)
13
13
 
14
14
  === Bugfixes
15
+ * Better coexistence with RSpec - Cucumber now *neuters* the part of RSpec that tries to parse ARGV.
15
16
  * The differ= exception is gone (#325, #340 Aslak Hellesøy)
16
17
 
17
18
  == 0.3.7 2009-05-22
@@ -326,7 +326,7 @@ lib/cucumber/platform.rb
326
326
  lib/cucumber/rails/rspec.rb
327
327
  lib/cucumber/rails/world.rb
328
328
  lib/cucumber/rake/task.rb
329
- lib/cucumber/rspec_option_parser_detector.rb
329
+ lib/cucumber/rspec_neuter.rb
330
330
  lib/cucumber/step_definition.rb
331
331
  lib/cucumber/step_match.rb
332
332
  lib/cucumber/step_mother.rb
@@ -2,7 +2,7 @@
2
2
  # Add '.rb' to work around a bug in IronRuby's File#dirname
3
3
  $:.unshift(File.dirname(__FILE__ + '.rb') + '/../lib') unless $:.include?(File.dirname(__FILE__ + '.rb') + '/../lib')
4
4
 
5
- require 'cucumber/rspec_option_parser_detector'
5
+ require 'cucumber/rspec_neuter'
6
6
  require 'cucumber/cli/main'
7
7
  begin
8
8
  # The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
@@ -444,7 +444,7 @@ Then I should have '&lt;count&gt;' cukes </div>
444
444
  <td class="skipped" id="row_10_0">10</td>
445
445
  </tr>
446
446
  <tr>
447
- <td colspan="1" class="failed">
447
+ <td class="failed" colspan="1">
448
448
  <pre>
449
449
  FAIL (RuntimeError)
450
450
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
@@ -716,7 +716,7 @@ Given &lt;other_state&gt; without a table </div>
716
716
  <td class="skipped" id="row_10_1">passing</td>
717
717
  </tr>
718
718
  <tr>
719
- <td colspan="2" class="failed">
719
+ <td class="failed" colspan="2">
720
720
  <pre>
721
721
  Undefined step: "missing without a table" (Cucumber::Undefined)
722
722
  features/outline_sample.feature:6:in `Given <state> without a table' </pre>
@@ -731,7 +731,7 @@ features/outline_sample.feature:6:in `Given <state> without a table'
731
731
  <td class="skipped" id="row_12_1">passing</td>
732
732
  </tr>
733
733
  <tr>
734
- <td colspan="2" class="failed">
734
+ <td class="failed" colspan="2">
735
735
  <pre>
736
736
  FAIL (RuntimeError)
737
737
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
@@ -864,7 +864,7 @@ Given &lt;state&gt; without a table </div>
864
864
  <td class="failed" id="row_16_0">failing</td>
865
865
  </tr>
866
866
  <tr>
867
- <td colspan="1" class="failed">
867
+ <td class="failed" colspan="1">
868
868
  <pre>
869
869
  FAIL (RuntimeError)
870
870
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
@@ -918,7 +918,7 @@ Given &lt;state&gt; without a table </div>
918
918
  <td class="failed" id="row_32_0">failing</td>
919
919
  </tr>
920
920
  <tr>
921
- <td colspan="1" class="failed">
921
+ <td class="failed" colspan="1">
922
922
  <pre>
923
923
  FAIL (RuntimeError)
924
924
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
@@ -0,0 +1,23 @@
1
+ require 'optparse'
2
+
3
+ module Spec
4
+ module Runner
5
+ # Neuters RSpec's option parser.
6
+ # (RSpec's option parser tries to parse ARGV, which
7
+ # will fail when running cucumber)
8
+ class OptionParser < ::OptionParser
9
+ NEUTERED_RSPEC = Object.new
10
+ def NEUTERED_RSPEC.method_missing(m, *args); self; end
11
+
12
+ def self.method_added(m)
13
+ unless @__neutering_rspec
14
+ @__neutering_rspec = true
15
+ define_method(m) do |*a|
16
+ NEUTERED_RSPEC
17
+ end
18
+ @__neutering_rspec = false
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
5
  TINY = 7
6
- PATCH = 4 # Set to nil for official release
6
+ PATCH = 5 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  STABLE_STRING = [MAJOR, MINOR, TINY].join('.')
@@ -15,7 +15,7 @@ config.action_controller.allow_forgery_protection = false
15
15
  # ActionMailer::Base.deliveries array.
16
16
  config.action_mailer.delivery_method = :test
17
17
 
18
- config.gem "cucumber", :lib => false, :version => ">=<%= Cucumber::VERSION::STABLE_STRING %>"
19
- config.gem "webrat", :lib => false, :version => ">=0.4.4"
20
- config.gem "rspec", :lib => false, :version => ">=1.2.6"
21
- config.gem "rspec-rails", :lib => false, :version => ">=1.2.6"
18
+ config.gem "cucumber", :lib => false, :version => ">=<%= Cucumber::VERSION::STABLE_STRING %>"
19
+ config.gem "webrat", :lib => false, :version => ">=0.4.4"
20
+ config.gem "rspec", :lib => false, :version => ">=1.2.6"
21
+ config.gem "rspec-rails", :lib => 'spec/rails', :version => ">=1.2.6"
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.3.7.4
4
+ version: 0.3.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"
@@ -403,7 +403,7 @@ files:
403
403
  - lib/cucumber/rails/rspec.rb
404
404
  - lib/cucumber/rails/world.rb
405
405
  - lib/cucumber/rake/task.rb
406
- - lib/cucumber/rspec_option_parser_detector.rb
406
+ - lib/cucumber/rspec_neuter.rb
407
407
  - lib/cucumber/step_definition.rb
408
408
  - lib/cucumber/step_match.rb
409
409
  - lib/cucumber/step_mother.rb
@@ -1,40 +0,0 @@
1
- require 'optparse'
2
-
3
- module Spec
4
- module Runner
5
- # Detects if RSpec's option parser is loaded and raises an error
6
- # if it is. (RSpec's option parser tries to parse ARGV, which
7
- # will fail when running cucumber)
8
- class OptionParser < ::OptionParser
9
- def self.bail
10
- raise <<-EOM
11
-
12
- RSpec's 'spec/runner/option_parser' should *not* be loaded when you're running
13
- Cucumber, but it seems it was loaded anyway. This is *not* a Cucumber bug.
14
- Some other code is loading more RSpec code than it should. There can be several
15
- reasons for this. The most common ones are:
16
-
17
- 1) Some of your own code does require 'spec'.
18
- Use require 'spec/expectations' instead.
19
- 2) Some of your own code does require 'spec/rails'.
20
- Use require 'spec/rails/expectations' instead.
21
- 3) Your Rails app's gem configuration is bad. Use
22
- config.gem 'rspec', :lib => false
23
- config.gem 'rspec-rails', :lib => false
24
- 4) Some other library you're using (indirectly)
25
- does require 'spec/runner/option_parser'.
26
- Analyze the stack trace below and get rid of it.
27
-
28
- EOM
29
- end
30
-
31
- if method_defined?(:options)
32
- bail
33
- end
34
-
35
- def self.method_added(*args)
36
- bail
37
- end
38
- end
39
- end
40
- end