Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guard + spork + Rspec issue - How do I remove hooks to Test::Unit?

I have guard-spork running on my rails 3.2.11 project on Ubuntu 12.04.

I got my configuration from railstutorial.org.

Spork starts, then guard says it can't find spork to start, waits 30 secs, then 60 secs, then works.

It works, but starts up with an error everytime. Just wondering if there is something I am doing wrong.

How do I remove hooks for Test::Unit?

Error Message:

16:31:58 - INFO - Starting Spork for RSpec, Test::Unit
Using RSpec
Preloading Rails environment
Couldn't find a supported test framework that begins with 'testunit'

Supported test frameworks:
( ) Cucumber
(*) RSpec

Legend: ( ) - not detected in project   (*) - detected
Loading Spork.prefork block...
Rack::File headers parameter replaces cache_control after Rack 1.5.
Spork is ready and listening on 8989!
16:32:28 - ERROR - Could not start Spork server for RSpec, Test::Unit after 30 seconds. I will continue waiting for a further 60 seconds.

16:33:28 - ERROR - Could not start Spork server for RSpec, Test::Unit. Make sure you can use it manually first.
like image 689
Dan Williams Avatar asked Feb 09 '13 21:02

Dan Williams


2 Answers

Or you can add test_unit: false as an option to guard-spork, i.e. in your Guardfile:

guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' }, :test_unit => false do

I acutally have some performance tests in my 'test' directory, so removing test/ is not always an option.

like image 66
ipd Avatar answered Sep 22 '22 11:09

ipd


Figured it out. . .

Just erase the test folder in the rails application root

rm -r test/

like image 39
Dan Williams Avatar answered Sep 21 '22 11:09

Dan Williams