You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AR tests do things like:
ActiveRecord::Base.configurations["arunit"].merge(database: "inexistent_activerecord_unittest")
which is also valid in applications. Not dup'ing the config is problematic:
E.g. the mysql adapter has this (simplified):
unless config[:url]
config[:url] = "...#{config[:database]}"
end
So once a DB connection has been made with the original config, :url is
set, above example that tries a different DB has no effect at all and
gives a connection the the original database instead. Fun.
.deep_dup solves the problem as the original config is left untouched.
0 commit comments