Skip to content

Instantly share code, notes, and snippets.

@adam-e-trepanier
Created July 14, 2011 19:00
Show Gist options
  • Save adam-e-trepanier/1083159 to your computer and use it in GitHub Desktop.
Save adam-e-trepanier/1083159 to your computer and use it in GitHub Desktop.
Spork reload factories
Spork.each_run do
# This code will be run each time you run your specs.
AppName::Application.reload_routes!
Factory.factories.clear
Dir.glob("#{::Rails.root}/spec/factories/*.rb").each { |file| load "#{file}" }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment