diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2017-09-04 00:43:29 +0300 |
---|---|---|
committer | Steffen van Bergerem <svbergerem@omgsrsly.net> | 2017-09-04 03:49:07 +0300 |
commit | 45e714776ebcbb13d6f40f67d2a6414820e362f0 (patch) | |
tree | baabc5c3f350a10307e8fe5c0ed4eadc0c552f40 | |
parent | 460178ad34e7be15fd4136f36bf0e7444563d2c5 (diff) |
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
-rw-r--r-- | features/support/env.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index cf95b37ef..f8ebb4a00 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -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 |