0

Anyone know of a more up-to-date version of a Rails Rspec/Guard/Spork/Growl test suite set up?

These used to be great, but have become outdated as Ruby, Rails and the gems upgraded.

http://ygamretuta.me/2011/08/10/rails-3-setting-up-guard-with-rspec-and-spork-with-growl-notifications-in-osx/

https://eq8scrapbook.heroku.com/equivalents_scrap/on_rspec_spork_guard_configuration

Even the M. Hartl Ruby on Rails Tutorial instructions results in Guard tossing up a ChildProcess error and doesn't load the DRb server.

bwobst
  • 340
  • 3
  • 13
  • Might be a good idea for you to figure out the problems with guard/childprocess(with help from Stack overflow, of course), and write your own blogpost ;-) – Prakash Murthy Mar 16 '13 at 04:41
  • @PrakashMurthy Thanks for the suggestion. The answer was just a little bit beyond what I had researched prior to asking. Turns out it was a mix of outdated gems (fixed the ChildProcess error) and making sure the test/ directory was removed (fixed the DRb server not running error). – bwobst Mar 16 '13 at 05:16

1 Answers1

0

Here's what I've found to fix my problem above:

rails new app_name --skip-test-framework

Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.12'
gem 'bootstrap-sass', '2.1'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'jquery-rails', '2.0.2'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.11.0'
  gem 'rspec', '2.11.0'
  gem 'guard', '1.6.2'
  gem 'guard-rspec', '1.2.1'
  gem 'guard-spork', '1.4.2'  
  gem 'spork-rails', '3.2.1'
  gem 'spork', '1.0.0rc3'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

group :test do
  gem 'capybara', '1.1.2'
  gem 'factory_girl_rails', '4.1.0'
  gem 'database_cleaner', '0.7.0'
  gem 'launchy', '2.1.0'
  gem 'rb-fsevent', :require => false
  gem 'growl', '1.0.3'
end

group :production do
  gem 'pg', '0.12.2'
end

Then run this:

bundle update; bundle install; rails g rspec:install; guard init rspec; guard init spork; spork --bootstrap

Guardfile

Put the boostrapped spork block before the rspec block

spec_helper.rb

Put the block starting with "ENV["RAILS_ENV"] ||= 'test'" inside the Spork.prefork block

.rspec add --drb

Run 'guard' and you should be all set.

bwobst
  • 340
  • 3
  • 13