aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-18 01:50:39 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-18 01:50:39 -0400
commiteede6962a8c1ee86b49907c1937fb0e3a38cf819 (patch)
treeb1fecd77caaf02500c33b9cbc5bb31ff6f9b0322 /spec
parent082079169caab2a00f62d9de9c4bdb5dcbc591aa (diff)
downloadrails-eede6962a8c1ee86b49907c1937fb0e3a38cf819.tar.gz
rails-eede6962a8c1ee86b49907c1937fb0e3a38cf819.tar.bz2
rails-eede6962a8c1ee86b49907c1937fb0e3a38cf819.zip
Log queries to debug.log when running specs
Diffstat (limited to 'spec')
-rw-r--r--spec/connections/mysql_connection.rb2
-rw-r--r--spec/connections/postgresql_connection.rb2
-rw-r--r--spec/connections/sqlite3_connection.rb2
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 = {