Skip to content

Commit 1d44fdc

Browse files
committed
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.
1 parent 8a2ca8c commit 1d44fdc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
require 'action_view'
44
require 'sprockets'
5-
require 'sprockets/rails'
5+
# Apps generated before Rails 7.0 without rails/all require sprockets/railtie, not sprockets/rails
6+
# Same with other reverse dependencies like sassc-rails
7+
require 'sprockets/railtie'
68
require 'sprockets/rails/context'
79
require 'sprockets/rails/helper'
810
require 'rails/version'

0 commit comments

Comments
 (0)