ensl.org/spec/support/database_cleaner.rb
Ari Timonen 6bcfffa1ee Major update, bugfixes
- Use ruby 2.7.7 as it fixed startup issues
- Update gems
- Remove depr. from puma startup
- Make entry.sh dir-agnostic

Fix tests:
- Use apparition
- Update migrations to use new syntax
- Some other minor changes
2023-02-19 17:08:46 +02:00

24 lines
441 B
Ruby

RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(
:deletion,
except: %w(ar_internal_metadata)
)
end
config.before(:each) do
DatabaseCleaner.strategy = :deletion
end
config.before(:each, js: true) do
DatabaseCleaner.strategy = :deletion
end
config.before(:each) do
DatabaseCleaner.start
end
config.append_after(:each) do
DatabaseCleaner.clean
end
end