test/dummy/config/environments/test.rb in csv_rails-0.6.1 vs test/dummy/config/environments/test.rb in csv_rails-0.7.0
- old
+ new
@@ -29,6 +29,12 @@
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
+ config.after_initialize do
+ if ActiveRecord::Base.connection.instance_variable_get(:@config)[:database] == ':memory:'
+ puts "creating sqlite in memory database"
+ load "#{Rails.root}/db/schema.rb"
+ end
+ end
end