Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.