Skip to content

Commit 3c94a36

Browse files
committed
Add rake test task to run tests over the 3 DBs we support
1 parent de2eca8 commit 3c94a36

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Rakefile

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "bundler/setup"
24

35
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
@@ -6,3 +8,14 @@ load "rails/tasks/engine.rake"
68
load "rails/tasks/statistics.rake"
79

810
require "bundler/gem_tasks"
11+
12+
def databases
13+
%w[ mysql postgres sqlite ]
14+
end
15+
16+
task :test do
17+
databases.each do |database|
18+
sh("TARGET_DB=#{database} bin/setup")
19+
sh("TARGET_DB=#{database} bin/rails test")
20+
end
21+
end

0 commit comments

Comments
 (0)