Skip to content

Instantly share code, notes, and snippets.

@benedikt
Created April 24, 2012 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benedikt/2479058 to your computer and use it in GitHub Desktop.
Save benedikt/2479058 to your computer and use it in GitHub Desktop.
Makes spork-rails reload everything nicely
Spork.each_run do
if Spork.using_spork?
ActionDispatch::Reloader.cleanup!
ActionDispatch::Reloader.prepare!
FactoryGirl.reload
end
# This line should only be necessary when you have support files
# that use a namespace which is defined somewhere in your application.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
end
# Also, make sure you don't cache classes in the test environment when spork is running:
#
# config.cache_classes = ENV['DRB'] != 'true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment