This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This rake will setup the tenant like rails | |
# setup the test database. | |
Rake::Task['db:test:prepare'].enhance do | |
# Connect in the test database. | |
Rails.env = 'test' | |
ActiveRecord::Base.establish_connection('test') | |
Apartment::Tenant.drop('app') rescue nil | |
Apartment::Tenant.create('appp') |