Skip to content

Commit

Permalink
Reset Singleton ActiveSupport::Dependencies.autoload_paths and autolo…
Browse files Browse the repository at this point in the history
…ad_once_paths
  • Loading branch information
ericproulx committed Jun 20, 2024
1 parent 62f57c0 commit 598b36a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/integration/rails/mounting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
require 'rails'
require 'action_controller/railtie'

ActiveSupport::Dependencies.autoload_paths = []
ActiveSupport::Dependencies.autoload_once_paths = []

Class.new(Rails::Application) do
config.eager_load = false
config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
Expand Down
4 changes: 4 additions & 0 deletions spec/integration/rails/railtie_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
subject { test_app.deprecators[:grape] }

let(:test_app) do

ActiveSupport::Dependencies.autoload_paths = []
ActiveSupport::Dependencies.autoload_once_paths = []

Class.new(Rails::Application) do
config.eager_load = false
config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
Expand Down

0 comments on commit 598b36a

Please sign in to comment.