transferred Code Ocean from original repository to GitHub
This commit is contained in:
12
spec/support/database_cleaner.rb
Normal file
12
spec/support/database_cleaner.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
require 'database_cleaner'
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.before(:suite) do
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
DatabaseCleaner.clean_with(:truncation)
|
||||
end
|
||||
|
||||
config.around(:each) do |example|
|
||||
DatabaseCleaner.cleaning { example.run }
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user