Skip to content

Instantly share code, notes, and snippets.

@ilpoldo
Created January 15, 2010 19:38
Show Gist options
  • Save ilpoldo/278344 to your computer and use it in GitHub Desktop.
Save ilpoldo/278344 to your computer and use it in GitHub Desktop.
Runs rspec test database in memory
# Reloads the db every time in memory. Faster (30%)!!
# Drop this file in spec/support
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
ActiveRecord::Migration.verbose = false
ActiveRecord::Migrator.up('db/migrate')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment