[rspec-devel] [ rspec-Bugs-11467 ] rake aborted!

noreply at rubyforge.org noreply at rubyforge.org
Mon Jun 11 17:36:15 EDT 2007


Bugs item #11467, was opened at 2007-06-08 16:12
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11467&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: Rejected
Priority: 3
Submitted By: Will Gray (graywh)
Assigned to: Nobody (None)
Summary: rake aborted!

Initial Comment:
The specs run fine, but rake gives an error message after "X examples, N failure".

10 examples, 1 failure
rake aborted!
Command ruby -I"/home/graywh/src/rails/project/vendor/plugins/rspec/lib" "/home/graywh/src/rails/project/vendor/plugins/rspec/bin/spec" "spec/models/person_spec.rb" --options "/home/graywh/src/rails/project/config/../spec/spec.opts"  failed
/home/graywh/src/rails/project/vendor/plugins/rspec/lib/spec/rake/spectask.rb:132:in `define'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:823:in `verbose'
/home/graywh/src/rails/project/vendor/plugins/rspec/lib/spec/rake/spectask.rb:106:in `define'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/usr/bin/rake:16:in `load'
/usr/bin/rake:16


----------------------------------------------------------------------

>Comment By: Will Gray (graywh)
Date: 2007-06-11 16:36

Message:
Then I find the double-reporting of failed specs confusing.
 Printing a message to stdout such as "109 examples, 2
failures" already tells me a spec failed.  Following that
with "rake aborted!  Command ... failed" made me think
something [other than a failed spec] went wrong.

How can I use the fail_on_error flag?

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-06-11 15:36

Message:
"When there is at least one failure, spec's exit status is 1.
 That causes system() to throw an exception at
rspec/lib/spec/rake/spectasks.rb:130 even though nothing
actually went wrong."

But something *did* go wrong. There was a failure in your specs, and that is wrong. Are you saying that you want Rake to always execute successfully, even when there are spec failures? How are we supposed to detect errors?

You can always set the fail_on_error flag if you want Rake to continue despite spec errors.

Or am I completely misunderstanding you? 

----------------------------------------------------------------------

Comment By: Will Gray (graywh)
Date: 2007-06-11 12:42

Message:
When there is at least one failure, spec's exit status is 1.
 That causes system() to throw an exception at
rspec/lib/spec/rake/spectasks.rb:130 even though nothing
actually went wrong.

----------------------------------------------------------------------

Comment By: Will Gray (graywh)
Date: 2007-06-11 09:18

Message:
I'm using the latest version from
svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails.

The problem only occurs when there is at least one failing
example.  It doesn't matter if I use 'rake spec', 'rake
spec:models', or 'rake spec SPEC=spec/models/my_model_spec.rb'.

Using 'script/spec' gives no errors.

My spec/spec.opts file contains the following options:
--colour
--format
specdoc
--loadby
mtime

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-08 16:27

Message:
Closing this because there is no information here that we can use to help you. Please feel free to re-open with version information plus some indication that it's an rspec problem. For example, if you do this:

script/spec spec

Do you get any weird errors?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11467&group_id=797


More information about the rspec-devel mailing list