Skip to content

Instantly share code, notes, and snippets.

@ikennaokpala
Created February 14, 2012 00:08
Show Gist options
  • Save ikennaokpala/1821709 to your computer and use it in GitHub Desktop.
Save ikennaokpala/1821709 to your computer and use it in GitHub Desktop.
Setup rspec, spork and autotest notifications

Generate project without tests:

rails new project_name -T

Edit Gemfile:

group :development do
  gem 'rspec-rails'
end

group :test do
  gem 'rspec'
  gem 'spork'
end

Setup dependencies:

bundle install
rails generate rspec:install

Setup spork:

spork --bootstrap

Open spec/spec_helper.rb in your favorite editor and change its contents according to instructions provided by spork and add --drb option to .rspec

Setup autotest:

gem install autotest
gem install autotest-rails-pure
gem install autotest-notification

Linux only:

apt-get install libnotify-bin

Mac only:

Install notifications support libraries

gem install autotest-fsevent
gem install autotest-growl

and update .autotest with:

require 'autotest/growl'
require 'autotest/fsevent'

Run everything:

spork
autotest

Enjoy! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment