-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathRakefile
37 lines (31 loc) · 951 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "bundler/gem_tasks"
require "rake/testtask"
namespace :test do
Rake::TestTask.new(:postgresql) do |t|
t.description = "Run tests for Postgres"
t.libs << "test"
t.test_files = FileList["test/**/*_test.rb"].exclude("test/{sqlite,mariadb,mysql}*_test.rb")
end
Rake::TestTask.new(:sqlite) do |t|
t.description = "Run tests for SQLite"
t.libs << "test"
t.test_files = FileList["test/**/sqlite*_test.rb"]
end
Rake::TestTask.new(:mariadb) do |t|
t.description = "Run tests for MariaDB"
t.libs << "test"
t.test_files = FileList["test/**/mariadb*_test.rb"]
end
Rake::TestTask.new(:mysql) do |t|
t.description = "Run tests for MySQL"
t.libs << "test"
t.test_files = FileList["test/**/mysql*_test.rb"]
end
end
task :test do
[:postgresql, :sqlite, :mariadb, :mysql].each do |adapter|
puts "Using #{adapter}"
Rake::Task["test:#{adapter}"].invoke
end
end
task default: :test