specs: remove database_cleaner
This is not needed for integration tests since Rails 5.1. See https://www.nicholasjacques.io/blog/you-probably-dont-need-databasecleaner/
This commit is contained in:
parent
b1eee27dd7
commit
df9fa258ae
1
Gemfile
1
Gemfile
|
@ -90,7 +90,6 @@ group :test do
|
|||
gem 'capybara-email' # Access emails during integration tests
|
||||
gem 'capybara-screenshot' # Save a dump of the page when an integration test fails
|
||||
gem 'capybara-selenium'
|
||||
gem 'database_cleaner'
|
||||
gem 'factory_bot'
|
||||
gem 'launchy'
|
||||
gem 'rails-controller-testing'
|
||||
|
|
|
@ -189,12 +189,6 @@ GEM
|
|||
css_parser (1.9.0)
|
||||
addressable
|
||||
daemons (1.3.1)
|
||||
database_cleaner (2.0.1)
|
||||
database_cleaner-active_record (~> 2.0.0)
|
||||
database_cleaner-active_record (2.0.0)
|
||||
activerecord (>= 5.a)
|
||||
database_cleaner-core (~> 2.0.0)
|
||||
database_cleaner-core (2.0.1)
|
||||
datetime_picker_rails (0.0.7)
|
||||
momentjs-rails (>= 2.8.1)
|
||||
deep_cloneable (3.0.0)
|
||||
|
@ -804,7 +798,6 @@ DEPENDENCIES
|
|||
chunky_png
|
||||
clamav-client
|
||||
daemons
|
||||
database_cleaner
|
||||
deep_cloneable
|
||||
delayed_cron_job
|
||||
delayed_job_active_record
|
||||
|
|
|
@ -58,7 +58,7 @@ RSpec.configure do |config|
|
|||
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
||||
# examples within a transaction, remove the following line or assign false
|
||||
# instead of true.
|
||||
config.use_transactional_fixtures = false
|
||||
config.use_transactional_fixtures = true
|
||||
|
||||
# RSpec Rails can automatically mix in different behaviours to your tests
|
||||
# based on their file location, for example enabling you to call `get` and
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
RSpec.configure do |config|
|
||||
expect_list = []
|
||||
|
||||
config.before(:suite) do
|
||||
DatabaseCleaner.clean_with(:truncation, except: expect_list)
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
end
|
||||
|
||||
config.before(:each, js: true) do
|
||||
DatabaseCleaner.strategy = :deletion, { except: expect_list }
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.start
|
||||
end
|
||||
|
||||
config.after(:each) do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue