Skip to content

Instantly share code, notes, and snippets.

@danielvlopes
Created May 31, 2010 18:34
Show Gist options
  • Save danielvlopes/420122 to your computer and use it in GitHub Desktop.
Save danielvlopes/420122 to your computer and use it in GitHub Desktop.
require 'database_cleaner'
DatabaseCleaner.strategy = :truncation
Spec::Runner.configure do |config|
config.use_transactional_fixtures = false
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment