Skip to content

Commit

Permalink
Add test:arel task to run only Arel tests
Browse files Browse the repository at this point in the history
Previously, all of the Arel tests would be run with every database
adapter. This is not necessarily a problem, but these tests end up
getting run along with every adapter's tests in CI even though none of
them require a database.

This commit starts the process of testing Arel separately from database
adapters by adding a new task to run Arel's tests. The next step will
be to add the test:arel task to Buildkite, and then the Arel tests can
be filtered from the list of adapter tests so that they are only run
once.
  • Loading branch information
skipkayhil committed Feb 28, 2023
1 parent 90cdfb9 commit f362f07
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions activerecord/Rakefile
Expand Up @@ -38,6 +38,14 @@ namespace :test do
%w(isolated_test_mysql2 isolated_test_sqlite3 isolated_test_postgresql)
run_without_aborting(*tasks)
end

Rake::TestTask.new(:arel) do |t|
t.libs << "test"
t.test_files = FileList["test/cases/arel/**/*_test.rb"]

t.warning = true
t.verbose = true
end
end

namespace :db do
Expand Down

0 comments on commit f362f07

Please sign in to comment.