aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/Rakefile
diff options
context:
space:
mode:
authorBrian Lopez <seniorlopez@gmail.com>2010-08-02 01:37:57 -0700
committerBrian Lopez <seniorlopez@gmail.com>2010-08-02 01:37:57 -0700
commit21e81da33570ba9453831cfc59c4f42ff9cdc1b2 (patch)
tree80146b258842d120e3362119971971911ca6a0ef /activerecord/Rakefile
parentfb0bd8c1092db51888ec4bb72af6c595e13c31fa (diff)
downloadrails-21e81da33570ba9453831cfc59c4f42ff9cdc1b2.tar.gz
rails-21e81da33570ba9453831cfc59c4f42ff9cdc1b2.tar.bz2
rails-21e81da33570ba9453831cfc59c4f42ff9cdc1b2.zip
update tests for mysql2 support
Diffstat (limited to 'activerecord/Rakefile')
-rw-r--r--activerecord/Rakefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile
index 36cd7e3e6c..c1e90cc099 100644
--- a/activerecord/Rakefile
+++ b/activerecord/Rakefile
@@ -24,14 +24,14 @@ def run_without_aborting(*tasks)
abort "Errors running #{errors.join(', ')}" if errors.any?
end
-desc 'Run mysql, sqlite, and postgresql tests by default'
+desc 'Run mysql, mysql2, sqlite, and postgresql tests by default'
task :default => :test
-desc 'Run mysql, sqlite, and postgresql tests'
+desc 'Run mysql, mysql2, sqlite, and postgresql tests'
task :test do
tasks = defined?(JRUBY_VERSION) ?
%w(test_jdbcmysql test_jdbcsqlite3 test_jdbcpostgresql) :
- %w(test_mysql test_sqlite3 test_postgresql)
+ %w(test_mysql test_mysql2 test_sqlite3 test_postgresql)
run_without_aborting(*tasks)
end
@@ -39,15 +39,15 @@ namespace :test do
task :isolated do
tasks = defined?(JRUBY_VERSION) ?
%w(isolated_test_jdbcmysql isolated_test_jdbcsqlite3 isolated_test_jdbcpostgresql) :
- %w(isolated_test_mysql isolated_test_sqlite3 isolated_test_postgresql)
+ %w(isolated_test_mysql isolated_test_mysql2 isolated_test_sqlite3 isolated_test_postgresql)
run_without_aborting(*tasks)
end
end
-%w( mysql postgresql sqlite3 firebird db2 oracle sybase openbase frontbase jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb ).each do |adapter|
+%w( mysql mysql2 postgresql sqlite3 firebird db2 oracle sybase openbase frontbase jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb ).each do |adapter|
Rake::TestTask.new("test_#{adapter}") { |t|
connection_path = "test/connections/#{adapter =~ /jdbc/ ? 'jdbc' : 'native'}_#{adapter}"
- adapter_short = adapter == 'db2' ? adapter : adapter[/^[a-z]+/]
+ adapter_short = adapter == 'db2' ? adapter : adapter[/^[a-z0-9]+/]
t.libs << "test" << connection_path
t.test_files = (Dir.glob( "test/cases/**/*_test.rb" ).reject {
|x| x =~ /\/adapters\//
@@ -59,7 +59,7 @@ end
task "isolated_test_#{adapter}" do
connection_path = "test/connections/#{adapter =~ /jdbc/ ? 'jdbc' : 'native'}_#{adapter}"
- adapter_short = adapter == 'db2' ? adapter : adapter[/^[a-z]+/]
+ adapter_short = adapter == 'db2' ? adapter : adapter[/^[a-z0-9]+/]
puts [adapter, adapter_short, connection_path].inspect
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
(Dir["test/cases/**/*_test.rb"].reject {