diff --git a/Gemfile b/Gemfile index 33cc8f5c0..9b9f4e2a2 100644 --- a/Gemfile +++ b/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' diff --git a/Gemfile.lock b/Gemfile.lock index 867650789..331dfb5e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 5141112b9..5aaacf792 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -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 diff --git a/spec/support/database_cleaner.rb b/spec/support/database_cleaner.rb deleted file mode 100644 index 553e7ce34..000000000 --- a/spec/support/database_cleaner.rb +++ /dev/null @@ -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