1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

truncate debug.log on each test run

This commit is contained in:
Francesco Rodriguez 2012-10-19 12:11:38 -05:00
parent 18e979eea3
commit 98043c689f

View file

@ -13,7 +13,8 @@ module ARTest
def self.connect
puts "Using #{connection_name}"
ActiveRecord::Model.logger = ActiveSupport::Logger.new("debug.log")
file = File.open('debug.log', 'w')
ActiveRecord::Model.logger = ActiveSupport::Logger.new(file)
ActiveRecord::Model.configurations = connection_config
ActiveRecord::Model.establish_connection 'arunit'
ARUnit2Model.establish_connection 'arunit2'