aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-10-19 12:11:38 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-10-19 12:11:38 -0500
commit98043c689f945cabffc043f4bdc80ab2a7edc763 (patch)
treeb25df3df26a6cd85ec1a7b32e0e45ca268589d82 /activerecord
parent18e979eea3844a9d293a547528d40ffde198b719 (diff)
downloadrails-98043c689f945cabffc043f4bdc80ab2a7edc763.tar.gz
rails-98043c689f945cabffc043f4bdc80ab2a7edc763.tar.bz2
rails-98043c689f945cabffc043f4bdc80ab2a7edc763.zip
truncate debug.log on each test run
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/support/connection.rb3
1 files changed, 2 insertions, 1 deletions
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'