Getting autotest working with Rails 3

Here’s all the stuff I needed to get autotest (formerly known as autospec) working with Rails 3 and rspec 2. I’m assuming you are using bundler.

# Gemfile
source ''

gem 'rails', '3.0.1'

group :development, :test do
  gem 'rspec'
  gem 'rspec-rails'

  group :autotest do 
    gem 'ZenTest'
    gem 'autotest'
    gem 'autotest-rails'
# .rspec
--format nested
# autotest/discover.rb
Autotest.add_discovery { "rails" }
Autotest.add_discovery { "rspec2" }

Then you can run:

$ autotest

at the command-line to run your specs automatically in a continuous testing fashion.

Categories: development

« Could not find gem 'zentest (>= 0, runtime)' in any of the gem sources ! Fingerprint already exists. Please use one ssh key per Heroku account »