7

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"

Community
  • 1
  • 1
udit
  • 2,745
  • 3
  • 33
  • 44

4 Answers4

4

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.

John Hyland
  • 6,855
  • 28
  • 32
1

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.

Magne
  • 16,401
  • 10
  • 68
  • 88
0

I had the same problem with Rails 2.3.2 except that I'm not using RSpec. In my case, installing the autotest-rails-pure gem got it working for me. Maybe autotest requires the correct plugin in order to detect a test within a file.

0

Cd into app directory and run the command: AUTOFEATURE=true autospec

To stop this process ^C twice

Reuben Peter-Paul
  • 1,550
  • 3
  • 15
  • 25