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

Merge pull request #7994 from frodsan/truncate_debug_log

truncate debug.log on each test run
This commit is contained in:
Rafael Mendonça França 2012-10-19 10:20:48 -07:00
commit 2268859daf

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'