[rspec-devel] [ rspec-Bugs-9982 ] `rake spec` for rspec_on_rails does not run tests.
noreply at rubyforge.org
noreply at rubyforge.org
Mon Apr 9 08:07:52 EDT 2007
Bugs item #9982, was opened at 2007-04-09 01:39
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=9982&group_id=797
Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Phil O. Despotos (philodespotos)
Assigned to: Nobody (None)
Summary: `rake spec` for rspec_on_rails does not run tests.
Initial Comment:
I am running rails edge, revision 6510, and the latest trunk of both rspec and rspec_on_rails checked out earlier today. Unfortunately, I don't get a REVISION_17.. file with rspec, nor do I use SVN, so I'm unsure of the exact revision.
It occurs both with and without --drb in spec.opts.
The output speaks for itself. I'm not sure how to go about demonstrating this with a spec or some such, and I'm not competent enough to dig through the source. Hopefully this suffices:
$ rake spec
(in /home/pd/rails/myproject)
/usr/local/bin/ruby18 -I"/home/pd/rails/myproject/vendor/plugins/rspec/lib" "/home/pd/rails/myproject/vendor/plugins/rspec/bin/spec" "spec/controllers/sites_controller_spec.rb" "spec/controllers/session_controller_spec.rb" "spec/models/site_spec.rb" "spec/models/user_spec.rb" "spec/models/site_info_spec.rb" "spec/views/sites/edit_erb_spec.rb" "spec/views/sites/index_erb_spec.rb" "spec/views/sites/new_erb_spec.rb" "spec/views/sites/show_erb_spec.rb" --options "/home/pd/rails/myproject/spec/spec.opts"
Finished in 7.4e-05 seconds
0 examples, 0 failures
$ rake spec:controllers
(in /home/pd/rails/myproject)
/usr/local/bin/ruby18 -I"/home/pd/rails/myproject/vendor/plugins/rspec/lib" "/home/pd/rails/myproject/vendor/plugins/rspec/bin/spec" "spec/controllers/sites_controller_spec.rb" "spec/controllers/session_controller_spec.rb" --options "/home/pd/rails/myproject/spec/spec.opts"
Finished in 7.5e-05 seconds
0 examples, 0 failures
$ script/spec spec/models/user_spec.rb
........................
Finished in 2.511908 seconds
24 examples, 0 failures
All tests run as expected when running manually.
Apologies if this looks awful, there's no preview functionality...
----------------------------------------------------------------------
>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-04-09 08:07
Message:
If your options file has --example previous_spec_failures.txt and that file doesn't exist, then RSpec will try to run only the spec with that name. Perhaps you deleted the file? (script/generate rspec should create an empty one for you)
The next time you run the specs everything should be restored to normal.
I realise this might be confusing, and we'd be happy to consider something more intuitive.
----------------------------------------------------------------------
Comment By: David Chelimsky (dchelimsky)
Date: 2007-04-09 06:52
Message:
Do the examples run the second time you run it? If so, then this is due to the following lines in spec/spec.opts (and is behaving as expected):
--failures
previous_spec_failures.txt
--example
previous_spec_failures.txt
This causes rspec to only run specs that have just failed. Once they pass, the next run should run them all.
Please report back as to whether that is what is going on.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=9982&group_id=797
More information about the rspec-devel
mailing list