From 98043c689f945cabffc043f4bdc80ab2a7edc763 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 19 Oct 2012 12:11:38 -0500 Subject: [PATCH] truncate debug.log on each test run --- activerecord/test/support/connection.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activerecord/test/support/connection.rb b/activerecord/test/support/connection.rb index 92736e0ca9..2d288542be 100644 --- a/activerecord/test/support/connection.rb +++ b/activerecord/test/support/connection.rb @@ -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'