aboutsummaryrefslogblamecommitdiffstats
path: root/spec/support/database_cleaner.rb
blob: 40acbc9b7ce519a48dc3a563de84027c4da19929 (plain) (tree)
1
2
3
4
5


                           

                                           











                                          
require 'database_cleaner'

RSpec.configure do |config|
  config.use_transactional_fixtures = false
  
  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
  end
  
  config.before(:each) do
    DatabaseCleaner.start
  end
  
  config.after(:each) do
    DatabaseCleaner.clean
  end
end