Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stephanschubert/912605 to your computer and use it in GitHub Desktop.
Save stephanschubert/912605 to your computer and use it in GitHub Desktop.
Fix the reloading issue when using Spork with Mongoid and/or Devise
Spork.each_run do
# This code will be run each time you run your specs.
load "#{Rails.root}/config/routes.rb"
Dir["#{Rails.root}/app/**/*.rb"].each { |f| load f }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment