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

22 lines
389 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
config.after(:each) do
DatabaseCleaner.clean
end
end