diff options
Diffstat (limited to 'activerecord/Rakefile')
-rwxr-xr-x[-rw-r--r--] | activerecord/Rakefile | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile index 395c72dfbc..e414c4fb1c 100644..100755 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -1,4 +1,4 @@ -require 'rake' +#!/usr/bin/env rake require 'rake/testtask' require 'rake/packagetask' require 'rake/gempackagetask' @@ -41,7 +41,7 @@ namespace :test do end end -%w( mysql mysql2 postgresql sqlite3 firebird db2 oracle sybase openbase frontbase jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb ).each do |adapter| +%w( mysql mysql2 postgresql sqlite3 sqlite3_mem 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-z0-9]+/] @@ -62,7 +62,7 @@ end (Dir["test/cases/**/*_test.rb"].reject { |x| x =~ /\/adapters\// } + Dir["test/cases/adapters/#{adapter_short}/**/*_test.rb"]).all? do |file| - system(ruby, "-Ilib:test:#{connection_path}", file) + sh(ruby, "-Ilib:test:#{connection_path}", file) end or raise "Failures" end @@ -72,6 +72,15 @@ end end end +rule '.sqlite3' do |t| + sh %Q{sqlite3 "#{t.name}" "create table a (a integer); drop table a;"} +end + +task :test_sqlite3 => [ + 'test/fixtures/fixture_database.sqlite3', + 'test/fixtures/fixture_database_2.sqlite3' +] + namespace :mysql do desc 'Build the MySQL test databases' task :build_databases do |