Don't truncate ar_internal_metadata after cucumber scenarios

This is an internal active record table and shouldn't be touched. When
this is truncated you need to fix it again by running
`bin/rails db:environment:set RAILS_ENV=test`

This is a temporary fix until there is a new version of
database_cleaner.

closes #7606
This commit is contained in:
Benjamin Neff 2017-09-03 23:43:29 +02:00 committed by Steffen van Bergerem
parent 460178ad34
commit 45e714776e
No known key found for this signature in database
GPG key ID: 315C9787D548DC6B

View file

@ -51,6 +51,9 @@ Capybara.default_max_wait_time = 30
# of your scenarios, as this makes it hard to discover errors in your application.
ActionController::Base.allow_rescue = false
# TODO: Temporary fix for rails 5, remove the next line after a new version of database_cleaner is released.
# See https://github.com/DatabaseCleaner/database_cleaner/issues/445
Cucumber::Rails::Database.javascript_strategy = :truncation, {except: %w[ar_internal_metadata]}
Cucumber::Rails::Database.autorun_database_cleaner = true
Cucumber::Rails::World.use_transactional_tests = false