Skip to content

Commit

Permalink
Prevent regressions with requiring sprockets/railtie
Browse files Browse the repository at this point in the history
Some applications or gems don't require sprockets/rails, instead they
load sprockets/railtie.

This change catches this issue when running tests.
  • Loading branch information
etiennebarrie committed Jun 10, 2024
1 parent 8a2ca8c commit 1d44fdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1d44fdc

Please sign in to comment.