activerecord-import/Rakefile
Zach Dennis 3523138a7a * Added basic import support for PostgreSQL.
* Requiring database adapter is now "require 'ar-extensions/import/<adapter_name>" so it won't conflict with previous versions of ar-extensions or other libraries extracted out of older ar-extensions, which "require 'ar-extensions'"
2010-04-08 20:57:10 -04:00

30 lines
683 B
Ruby

require 'rake/testtask'
task :default => ["display:notice"]
ADAPTERS = %w(mysql postgresql sqlite3 oracle)
namespace :display do
task :notice do
puts
puts "To run tests you must supply the adapter, see rake -T for more information."
puts
end
end
desc "Runs generic database tests."
Rake::TestTask.new("test") { |t|
t.test_files = FileList["test/*_test.rb", "test/#{ENV['ARE_DB']}/**/*_test.rb"]
}
ADAPTERS.each do |adapter|
namespace :test do
desc "Runs unit tests for #{adapter} specific functionality"
task adapter do
ENV["ARE_DB"] = adapter
exec "rake test"
# exec replaces the current process, never gets here
end
end
end