Skip to content

Commit

Permalink
Add rake test task to run tests over the 3 DBs we support
Browse files Browse the repository at this point in the history
  • Loading branch information
rosa committed Sep 9, 2024
1 parent de2eca8 commit 3c94a36
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "bundler/setup"

APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
Expand All @@ -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

0 comments on commit 3c94a36

Please sign in to comment.