Skip to content
Browse files

set the environment variable from the rake file

  • Loading branch information...
1 parent 424cf3b commit 8392f10b58fe3f95b99131da89d9c3fd561bd2e6 @tenderlove tenderlove committed Jun 6, 2011
View
7 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|
View
1 activerecord/test/connections/db2.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'db2'
View
1 activerecord/test/connections/firebird.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'firebird'
View
1 activerecord/test/connections/frontbase.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'frontbase'
View
1 activerecord/test/connections/jdbcderby.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcderby'
View
1 activerecord/test/connections/jdbch2.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbch2'
View
1 activerecord/test/connections/jdbchsqldb.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbchsqldb'
View
1 activerecord/test/connections/jdbcmysql.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcmysql'
View
1 activerecord/test/connections/jdbcpostgresql.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcpostgresql'
View
1 activerecord/test/connections/jdbcsqlite3.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'jdbcsqlite3'
View
1 activerecord/test/connections/mysql.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'mysql'
View
1 activerecord/test/connections/mysql2.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'mysql2'
View
1 activerecord/test/connections/openbase.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'openbase'
View
1 activerecord/test/connections/oracle.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'oracle_enhanced'
View
1 activerecord/test/connections/postgresql.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'postgresql'
View
1 activerecord/test/connections/sqlite3.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'sqlite3'
View
1 activerecord/test/connections/sqlite3_mem.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'sqlite3_mem'
View
1 activerecord/test/connections/sybase.rb
@@ -1 +0,0 @@
-ENV['ARCONN'] = 'sybase'

0 comments on commit 8392f10

Please sign in to comment.
Something went wrong with that request. Please try again.