Created
October 7, 2013 14:40
-
-
Save robbl/6869107 to your computer and use it in GitHub Desktop.
safe database cleaner strategy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.use_transactional_fixtures = false | |
config.before :suite do | |
DatabaseCleaner.strategy = :truncation | |
DatabaseCleaner.clean_with(:truncation) | |
end | |
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