What does rails load before a minitest? (very slow tests with rails 6)

Viewed 71

I have a very simple test:

require 'test_helper'

class InformationRequestTest < ActiveSupport::TestCase
  test 'valid information request can be saved' do
    FactoryBot.create(:information_request)
  end
end

In rails 5.2 this test takes 14 seconds

In rails 6.0 this test takes 159 seconds

I used Benchmark to measure test_helper and it takes 3 seconds (in rails 6) to load, and the test itself is also just a few seconds. So something before the test is taking over 2 minutes to load... but what is it? How do I follow Rails' steps to find out exactly what's taking so long?

0 Answers
Related