Do not hard code test connection names in database cleaner

This commit is contained in:
Artur Beljajev 2017-04-12 20:00:45 +03:00
parent 5260f9e586
commit 1889345205

View file

@ -1,5 +1,5 @@
RSpec.configure do |config|
db_connection_names = ActiveRecord::Base.configurations.keys.grep(/test/).map(&:to_sym)
db_connection_names = ActiveRecord::Base.configurations.keys.grep(/test/).map(&:to_sym).reverse
config.before :suite do
DatabaseCleaner.strategy = :truncation