Skip to content

Commit 51e2b14

Browse files
committed
Support Rails 7 in performance_test_help.rb
Rails 7 has removed the ability to configure the mechanism used for autoloading.
1 parent c87689d commit 51e2b14

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ tests will set the following configuration parameters:
415415

416416
```bash
417417
ActionController::Base.perform_caching = true
418-
ActiveSupport::Dependencies.mechanism = :require
418+
ActiveSupport::Dependencies.mechanism = :require if ActiveSupport::Dependencies.respond_to?(:mechanism=)
419419
Rails.logger.level = ActiveSupport::Logger::INFO
420420
```
421421

lib/rails/performance_test_help.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ActionController::Base.perform_caching = true
2-
ActiveSupport::Dependencies.mechanism = :require
2+
ActiveSupport::Dependencies.mechanism = :require if ActiveSupport::Dependencies.respond_to?(:mechanism=)
33
Rails.logger.level = ActiveSupport::Logger::INFO

0 commit comments

Comments
 (0)