aboutsummaryrefslogblamecommitdiffstats
path: root/spec/support/database_cleaner.rb
blob: a104c5360672fdec7d2993f7b1c69e2be10bfc49 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                          
require 'database_cleaner'

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