When you initialize RSpec in a Rails project, you get two files: spec/spec_helper.rb and spec/rails_helper.rb. They serve two different purposes and which one you require can have a drastic impact on your test speeds. In this video, I explain why that is, when to require each, and ways to keep your tests fast.
View the source for this episode: https://github.com/brettchalupa/scree...
Companion blog post: https://code.brettchalupa.com/spec_he...
Versions used:
Ruby 3.1.1
Rails 7.0.04