Refactor rspec config and support files

#206
This commit is contained in:
Artur Beljajev 2016-10-20 19:17:58 +03:00
parent ee3ec69e54
commit 2e9724f50d

View file

@ -19,7 +19,7 @@ RSpec.configure do |config|
end
end
config.after :each do |example|
config.after :example do |example|
if example.metadata[:db] || (%i(model).include?(example.metadata[:type]) && example.metadata[:db].nil?)
db_connection_names.each do |connection_name|
ActiveRecord::Base.establish_connection(connection_name)