diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-18 01:50:39 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-18 01:50:39 -0400 |
commit | eede6962a8c1ee86b49907c1937fb0e3a38cf819 (patch) | |
tree | b1fecd77caaf02500c33b9cbc5bb31ff6f9b0322 | |
parent | 082079169caab2a00f62d9de9c4bdb5dcbc591aa (diff) | |
download | rails-eede6962a8c1ee86b49907c1937fb0e3a38cf819.tar.gz rails-eede6962a8c1ee86b49907c1937fb0e3a38cf819.tar.bz2 rails-eede6962a8c1ee86b49907c1937fb0e3a38cf819.zip |
Log queries to debug.log when running specs
-rw-r--r-- | spec/connections/mysql_connection.rb | 2 | ||||
-rw-r--r-- | spec/connections/postgresql_connection.rb | 2 | ||||
-rw-r--r-- | spec/connections/sqlite3_connection.rb | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/spec/connections/mysql_connection.rb b/spec/connections/mysql_connection.rb index b4e27f2380..a58ddc35ef 100644 --- a/spec/connections/mysql_connection.rb +++ b/spec/connections/mysql_connection.rb @@ -1,6 +1,8 @@ require "activerecord" puts "Using native MySQL" +ActiveRecord::Base.logger = Logger.new("debug.log") + ActiveRecord::Base.configurations = { 'unit' => { :adapter => 'mysql', diff --git a/spec/connections/postgresql_connection.rb b/spec/connections/postgresql_connection.rb index 505dcdd1ef..e376d33ec6 100644 --- a/spec/connections/postgresql_connection.rb +++ b/spec/connections/postgresql_connection.rb @@ -1,6 +1,8 @@ require "activerecord" puts "Using native PostgreSQL" +ActiveRecord::Base.logger = Logger.new("debug.log") + ActiveRecord::Base.configurations = { 'unit' => { :adapter => 'postgresql', diff --git a/spec/connections/sqlite3_connection.rb b/spec/connections/sqlite3_connection.rb index bae077711d..649492f804 100644 --- a/spec/connections/sqlite3_connection.rb +++ b/spec/connections/sqlite3_connection.rb @@ -1,6 +1,8 @@ require "activerecord" puts "Using native SQLite3" +ActiveRecord::Base.logger = Logger.new("debug.log") + db_file = "spec/fixtures/fixture_database.sqlite3" ActiveRecord::Base.configurations = { |