Sha256: 6aa4b1fa64b2d02f9ec127415bed92f4541d97ce66183d4b8ea1352573a54581
Contents?: true
Size: 504 Bytes
Versions: 5
Compression:
Stored size: 504 Bytes
Contents
module MultiDatabase9000 def self.maintain_all_test_schemas! # :nodoc: # Roundrip to Rake to allow plugins to hook into database initialization. FileUtils.cd Rails.root do current_config = ActiveRecord::Base.connection_config ActiveRecord::Base.clear_all_connections! system("bin/rake db:test:prepare") # Establish a new connection, the old database may be gone (db:test:prepare uses purge) ActiveRecord::Base.establish_connection(current_config) end end end
Version data entries
5 entries across 5 versions & 1 rubygems