Rake cucumber aborts after successfull feature scenarios

Hi

rake cucumber:wip aborts with error messages after successfully running
feature scenarios.

Platform:
Windows XP

Ruby version:
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

Relevant gems in bundle:

  • bundler (1.0.7)
  • cucumber (0.10.0)
  • cucumber-rails (0.3.2)
  • gherkin (2.3.3)
  • rails (3.0.0)
  • rake (0.8.7)
  • rspec (2.3.0)
  • rspec-core (2.3.1)
  • rspec-expectations (2.3.0)
  • rspec-mocks (2.3.0)
  • rspec-rails (2.3.1)

Command-line output:
(Example taken from “The RSpec Book”)

D:\work@home\workspace\showtime>rake cucumber:wip
(in D:/work@home/workspace/showtime)
bundle exec C:/Ruby192/bin/ruby.exe -I
“C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.10.0/lib;lib”
“C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.10.0/bin/cucumber”
–profile wip
*** WARNING: You must use ANSICON 1.31 or higher (
http://adoxa.110mb.com/ansicon) to get coloured output on Windows
Using the wip profile…
Feature: Showtime Descriptions

So that I can find movies that fit my schedule
As a movie goer
I want to see accurate and concise showtimes

@wip
Scenario: Show minutes for times not ending with 00

features\showtime_descriptions.feature:8
Given a movie

features/step_definitions/showtime_steps.rb:1
When I set the showtime to “2007-10-10” at “2:15pm”

features/step_definitions/showtime_steps.rb:5
Then the showtime description should be “October 10, 2007 (2:15pm)”

features/step_definitions/showtime_steps.rb:10

1 scenario (1 passed)
3 steps (3 passed)
0m3.484s

The --wip switch was used, so I didn’t expect anything to pass. These
scenarios passed:
(::slight_smile: passed scenarios (::slight_smile:

features\showtime_descriptions.feature:8:in `Scenario: Show minutes for
times not ending with 00’

rake aborted!
Command failed with status (1): [bundle exec C:/Ruby192/bin/ruby.exe -I
"C:…]
C:/Ruby192/lib/ruby/1.9.1/rake.rb:993:in block in sh' C:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in call’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in sh' C:/Ruby192/lib/ruby/1.9.1/rake.rb:1092:in sh’
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.10.0/lib/cucumber/rake/task.rb:72:in
run' C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-0.10.0/lib/cucumber/rake/task.rb:142:in block in define_task’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in call' C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in block in execute’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in each' C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in execute’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:595:in block in invoke_with_call_chain' C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in invoke_with_call_chain' C:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in invoke’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:in invoke_task' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in block (2 levels) in
top_level’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in each' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in block in top_level’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in top_level’
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in run' C:/Ruby192/bin/rake:31:in

I did google this issue, and I found this:
https://rspec.lighthouseapp.com/projects/16211/tickets/680-rake-cucumber-throws-an-error-after-running-all-the-scenarios

A.H. states in this Lighthouse issue that the --strict option causes
cucumber to exit with a non-zero exit status if one has pending or
undefined
steps.

In my example, I don’t have pending or undefined steps, but it still
reports
rake aborted…

Any ideas?

Kind regards,
Rolf

On 5 January 2011 11:21, Rolf P. [email protected] wrote:

features/step_definitions/showtime_steps.rb:1
The --wip switch was used, so I didn’t expect anything to pass. These
scenarios passed:
(::slight_smile: passed scenarios (::slight_smile:

features\showtime_descriptions.feature:8:in `Scenario: Show minutes for
times not ending with 00’

Could the backslash be an issue here?

Colin

How so, Colin?
I guess the use of backslash is just the way Cucumber reports for the
feature, since I’m using Windows…

-Rolf

Ok - thanks, Colin

But it looks to me like Cucumber finishes nicely by reporting the
successful
scenarios (in this case only one):
(::slight_smile: passed scenarios (::slight_smile:

features\showtime_descriptions.feature:8:in `Scenario: Show minutes for
times not ending with 00’

But there is something going on after it completes…

-Rolf

On 5 January 2011 13:18, Rolf P. [email protected] wrote:

How so, Colin?
I guess the use of backslash is just the way Cucumber reports for the
feature, since I’m using Windows…

I don’t know (I was just pointing out the possible issue). I noticed
that the failure is in the area of this line and it is the only one
showing the backslash hence wondered whether it might be a factor.

Colin

On 5 January 2011 15:15, Rolf P. [email protected] wrote:

Ok - thanks, Colin

But it looks to me like Cucumber finishes nicely by reporting the successful
scenarios (in this case only one):
(::slight_smile: passed scenarios (::slight_smile:

features\showtime_descriptions.feature:8:in `Scenario: Show minutes for
times not ending with 00’

This might be interesting -
Ruby 1.9.1 on Windows with Rails, MS SQL Server and Cucumber - Lovor blog -
about half way down where it talks about backslash and SET
CUCUMBER_FORWARD_SLASH_PATHS

Colin