diff --git a/Rakefile b/Rakefile index e7793b5c..951e3527 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "bundler/setup" APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__) @@ -6,3 +8,14 @@ load "rails/tasks/engine.rake" load "rails/tasks/statistics.rake" require "bundler/gem_tasks" + +def databases + %w[ mysql postgres sqlite ] +end + +task :test do + databases.each do |database| + sh("TARGET_DB=#{database} bin/setup") + sh("TARGET_DB=#{database} bin/rails test") + end +end