gitlab-org--gitlab-foss/spec/support/db_cleaner.rb

22 lines
389 B
Ruby
Raw Normal View History

RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
2015-06-22 14:54:33 -04:00
config.before(:each, js: true) do
DatabaseCleaner.strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end