Last active
December 15, 2015 04:29
-
-
Save acnalesso/5202221 to your computer and use it in GitHub Desktop.
Spork to reload models when change is made, Using Guard, Spork, and RSpec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OS: Linux Debian Lenny | |
gem versions: | |
factory_girl_rails-4.2.1 | |
spork-1.0.0rc3 | |
guard-1.6.2 | |
rails-3.2.9 | |
rspec-rails-2.13.0 | |
Gemfile: | |
group :test do | |
gem 'guard-rspec' | |
gem 'guard-spork' | |
gem 'spork-rails' | |
gem 'factory_girl_rails', :require => false | |
end | |
spec/spec_helper.rb | |
also removed require 'rubygems'(because we're using bundle' | |
Spork.each_run do | |
require 'factory_girl_rails' | |
FactoryGirl.reload | |
end | |
Guardfile: | |
guard 'rspec', :cli => '--drb --format Fuubar --color', :all_one_start => false, :all_afeter_pass => false do | |
#Rails example | |
watch(r%{^app/models/(.+)\.rb$}) { "spec/models" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment