Skip to content

Instantly share code, notes, and snippets.

@lightscalar
Created September 17, 2011 18:58
Show Gist options
  • Save lightscalar/1224227 to your computer and use it in GitHub Desktop.
Save lightscalar/1224227 to your computer and use it in GitHub Desktop.
Setting up my test environment with RSPEC/GUARD/SPORK

Add the following gems to your gem file:

group :development, :test do
  gem 'jasmine'
  gem 'jasminerice'
  gem 'database_cleaner'
  gem 'capybara'
  gem 'rspec', ">= 2.5.0"
  gem "rspec-rails", ">= 2.5.0"
  gem "factory_girl_rails", "~> 1.1.rc1"
  gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
  gem 'guard-rspec'
  gem 'spork', '~> 0.9.0.rc'
  gem 'guard-spork'
  gem 'turn', :require => false
end

Now run the following commands to install RSPEC:

mjl> rails g rspec:install
mjl> guard init
mjl> guard init spork
mjl> guard init rspec
mjl> spork --bootstrap
mjl> rails g backbone:install

Open up the spec_helper file and follow the directions therein.

Now just fire up the test servers using:

> guard

Et voila! You're good to go.

@smakman
Copy link

smakman commented Feb 17, 2012

Thanks for you gist! Altered it for my needs: https://gist.github.com/1853431

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