Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

autotest shows blank

I installed the autotest gem and intend to use it with rspec. The problem is, when I run autotest under my rails app, all I see is :

railsapp$ autospec

loading autotest/rails_rspec


And its stuck there until I Ctrl-C out of it. Nothing changes even if I change a rspec test or code.

Here's my ~/.autotest

require "autotest/restart"

require 'redgreen/autotest'

require 'autotest/fsevent'

require "autotest/growl"

like image 305
udit Avatar asked Apr 29 '10 13:04

udit


2 Answers

I had the same problem. I was eventually able to get everything working by making sure I was on the latest (beta, if necessary) versions of rspec, rspec-rails, autotest, and autotest-rails, and putting the following in autotest/discovery.rb:

Autotest.add_discovery { "rails" }
Autotest.add_discovery { "rspec2" }

Here's the blog post that got me started in the right direction.

like image 171
John Hyland Avatar answered Nov 11 '22 14:11

John Hyland


I had the same problem, and this fixed it:

"Make sure you have a .rspec file in the project root. That tells RSpec to tell Autotest to load RSpec’s autotest extension."

ref: https://github.com/rspec/rspec/wiki/autotest

It seems as if my .rspec file had gotten deleted when messing around with git.

like image 41
Magne Avatar answered Nov 11 '22 13:11

Magne