aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-06-06 16:51:28 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-06-06 16:51:45 -0700
commit8392f10b58fe3f95b99131da89d9c3fd561bd2e6 (patch)
tree13a383ba6f6120964fee1a5d9225add15d90ace4
parent424cf3b0502d8557982ed837a7ed317f9eb280e8 (diff)
downloadrails-8392f10b58fe3f95b99131da89d9c3fd561bd2e6.tar.gz
rails-8392f10b58fe3f95b99131da89d9c3fd561bd2e6.tar.bz2
rails-8392f10b58fe3f95b99131da89d9c3fd561bd2e6.zip
set the environment variable from the rake file
-rwxr-xr-xactiverecord/Rakefile7
-rw-r--r--activerecord/test/connections/db2.rb1
-rw-r--r--activerecord/test/connections/firebird.rb1
-rw-r--r--activerecord/test/connections/frontbase.rb1
-rw-r--r--activerecord/test/connections/jdbcderby.rb1
-rw-r--r--activerecord/test/connections/jdbch2.rb1
-rw-r--r--activerecord/test/connections/jdbchsqldb.rb1
-rw-r--r--activerecord/test/connections/jdbcmysql.rb1
-rw-r--r--activerecord/test/connections/jdbcpostgresql.rb1
-rw-r--r--activerecord/test/connections/jdbcsqlite3.rb1
-rw-r--r--activerecord/test/connections/mysql.rb1
-rw-r--r--activerecord/test/connections/mysql2.rb1
-rw-r--r--activerecord/test/connections/openbase.rb1
-rw-r--r--activerecord/test/connections/oracle.rb1
-rw-r--r--activerecord/test/connections/postgresql.rb1
-rw-r--r--activerecord/test/connections/sqlite3.rb1
-rw-r--r--activerecord/test/connections/sqlite3_mem.rb1
-rw-r--r--activerecord/test/connections/sybase.rb1
18 files changed, 6 insertions, 18 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile
index 9776dfea3e..8b0f76048f 100755
--- a/activerecord/Rakefile
+++ b/activerecord/Rakefile
@@ -50,7 +50,6 @@ end
t.verbose = true
t.warning = true
- t.ruby_opts = ["-r#{File.expand_path('../', __FILE__)}/test/connections/#{adapter}"]
}
task "isolated_test_#{adapter}" do
@@ -67,7 +66,13 @@ end
namespace adapter do
task :test => "test_#{adapter}"
task :isolated_test => "isolated_test_#{adapter}"
+
+ # Set the connection environment for the adapter
+ task :env { ENV['ARCONN'] = adapter }
end
+
+ # Make sure the adapter test evaluates the env setting task
+ task "test_#{adapter}" => "#{adapter}:env"
end
rule '.sqlite3' do |t|
diff --git a/activerecord/test/connections/db2.rb b/activerecord/test/connections/db2.rb
deleted file mode 100644
index f43b3fda57..0000000000
--- a/activerecord/test/connections/db2.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'db2'
diff --git a/activerecord/test/connections/firebird.rb b/activerecord/test/connections/firebird.rb
deleted file mode 100644
index fa874c0bb3..0000000000
--- a/activerecord/test/connections/firebird.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'firebird'
diff --git a/activerecord/test/connections/frontbase.rb b/activerecord/test/connections/frontbase.rb
deleted file mode 100644
index 9d1d5597d4..0000000000
--- a/activerecord/test/connections/frontbase.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'frontbase'
diff --git a/activerecord/test/connections/jdbcderby.rb b/activerecord/test/connections/jdbcderby.rb
deleted file mode 100644
index 1c7b63ccdc..0000000000
--- a/activerecord/test/connections/jdbcderby.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcderby'
diff --git a/activerecord/test/connections/jdbch2.rb b/activerecord/test/connections/jdbch2.rb
deleted file mode 100644
index d2fb177ae3..0000000000
--- a/activerecord/test/connections/jdbch2.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbch2'
diff --git a/activerecord/test/connections/jdbchsqldb.rb b/activerecord/test/connections/jdbchsqldb.rb
deleted file mode 100644
index 22e6d8729e..0000000000
--- a/activerecord/test/connections/jdbchsqldb.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbchsqldb'
diff --git a/activerecord/test/connections/jdbcmysql.rb b/activerecord/test/connections/jdbcmysql.rb
deleted file mode 100644
index f1aaad93a3..0000000000
--- a/activerecord/test/connections/jdbcmysql.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcmysql'
diff --git a/activerecord/test/connections/jdbcpostgresql.rb b/activerecord/test/connections/jdbcpostgresql.rb
deleted file mode 100644
index 6809115f36..0000000000
--- a/activerecord/test/connections/jdbcpostgresql.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcpostgresql'
diff --git a/activerecord/test/connections/jdbcsqlite3.rb b/activerecord/test/connections/jdbcsqlite3.rb
deleted file mode 100644
index 9cc872905a..0000000000
--- a/activerecord/test/connections/jdbcsqlite3.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcsqlite3'
diff --git a/activerecord/test/connections/mysql.rb b/activerecord/test/connections/mysql.rb
deleted file mode 100644
index 2f30603098..0000000000
--- a/activerecord/test/connections/mysql.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'mysql'
diff --git a/activerecord/test/connections/mysql2.rb b/activerecord/test/connections/mysql2.rb
deleted file mode 100644
index 10aa9171bd..0000000000
--- a/activerecord/test/connections/mysql2.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'mysql2'
diff --git a/activerecord/test/connections/openbase.rb b/activerecord/test/connections/openbase.rb
deleted file mode 100644
index bf072579f4..0000000000
--- a/activerecord/test/connections/openbase.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'openbase'
diff --git a/activerecord/test/connections/oracle.rb b/activerecord/test/connections/oracle.rb
deleted file mode 100644
index 352028ce33..0000000000
--- a/activerecord/test/connections/oracle.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'oracle_enhanced'
diff --git a/activerecord/test/connections/postgresql.rb b/activerecord/test/connections/postgresql.rb
deleted file mode 100644
index b8bfb6e846..0000000000
--- a/activerecord/test/connections/postgresql.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'postgresql'
diff --git a/activerecord/test/connections/sqlite3.rb b/activerecord/test/connections/sqlite3.rb
deleted file mode 100644
index e5c75657a5..0000000000
--- a/activerecord/test/connections/sqlite3.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'sqlite3'
diff --git a/activerecord/test/connections/sqlite3_mem.rb b/activerecord/test/connections/sqlite3_mem.rb
deleted file mode 100644
index 900a5c7947..0000000000
--- a/activerecord/test/connections/sqlite3_mem.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'sqlite3_mem'
diff --git a/activerecord/test/connections/sybase.rb b/activerecord/test/connections/sybase.rb
deleted file mode 100644
index 7decdf7f39..0000000000
--- a/activerecord/test/connections/sybase.rb
+++ /dev/null
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'sybase'