gitlab-org--gitlab-foss/spec/support/db_cleaner.rb
2014-05-30 23:19:50 +02:00

21 lines
388 B
Ruby

RSpec.configure do |config|
config.around(:each) do
DatabaseCleaner.clean_with(:truncation)
end
config.around(:each) do
DatabaseCleaner.strategy = :transaction
end
config.around(:each, js: true) do
DatabaseCleaner.strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end