Skip to content

Instantly share code, notes, and snippets.

@kenton
Created April 8, 2014 14:35
Show Gist options
  • Save kenton/10134254 to your computer and use it in GitHub Desktop.
Save kenton/10134254 to your computer and use it in GitHub Desktop.
Automate migrations in specs
# in spec_helper.rb or wherever your testing framework has initialization code
if ActiveRecord::Migrator.needs_migration?
ActiveRecord::Migrator.migrate(File.join(Rails.root, 'db/migrate'))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment