debian-mirror-gitlab/spec/support/db_cleaner.rb

22 lines
396 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
2015-09-11 14:41:01 +05:30
config.before(:each, js: true) do
2014-09-02 18:07:02 +05:30
DatabaseCleaner.strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.start
end
2016-09-29 09:46:39 +05:30
config.append_after(:each) do
2014-09-02 18:07:02 +05:30
DatabaseCleaner.clean
end
end