aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/database_cleaner.rb
blob: 40acbc9b7ce519a48dc3a563de84027c4da19929 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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