From 1d44fdc9190cca7fc5d4d264166d2b31c5f98780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Mon, 10 Jun 2024 13:36:43 +0200 Subject: [PATCH] Prevent regressions with requiring sprockets/railtie Some applications or gems don't require sprockets/rails, instead they load sprockets/railtie. This change catches this issue when running tests. --- test/test_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index b8a75782..bca05da7 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,7 +2,9 @@ require 'action_view' require 'sprockets' -require 'sprockets/rails' +# Apps generated before Rails 7.0 without rails/all require sprockets/railtie, not sprockets/rails +# Same with other reverse dependencies like sassc-rails +require 'sprockets/railtie' require 'sprockets/rails/context' require 'sprockets/rails/helper' require 'rails/version'