aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2019-03-08 18:03:29 +0100
committerGitHub <noreply@github.com>2019-03-08 18:03:29 +0100
commit32d2a63bf4c77e11f8b7930629fdc206af51c51e (patch)
tree8f3679839ebdcf5780f7abf68a82c90d0298fdcc /railties/test
parent199de6bee261dd816b68c841c7775fdcd02b68d2 (diff)
parent6d624f2de94623b4e94375edb882ae0ccfc0cb88 (diff)
downloadrails-32d2a63bf4c77e11f8b7930629fdc206af51c51e.tar.gz
rails-32d2a63bf4c77e11f8b7930629fdc206af51c51e.tar.bz2
rails-32d2a63bf4c77e11f8b7930629fdc206af51c51e.zip
Merge pull request #35533 from Shopify/zeitwerk-custom-inflectors
Allow autoloader inflectors to be swaped out
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/configuration_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index 73773602a3..9ba5517afd 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -1167,6 +1167,8 @@ module ApplicationTests
assert_instance_of Zeitwerk::Loader, Rails.autoloaders.once
assert_equal "rails.once", Rails.autoloaders.once.tag
assert_equal [Rails.autoloaders.main, Rails.autoloaders.once], Rails.autoloaders.to_a
+ assert_equal ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector, Rails.autoloaders.main.inflector
+ assert_equal ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector, Rails.autoloaders.once.inflector
config.autoloader = :classic
assert_not Rails.autoloaders.zeitwerk_enabled?
@@ -1181,6 +1183,8 @@ module ApplicationTests
assert_instance_of Zeitwerk::Loader, Rails.autoloaders.once
assert_equal "rails.once", Rails.autoloaders.once.tag
assert_equal [Rails.autoloaders.main, Rails.autoloaders.once], Rails.autoloaders.to_a
+ assert_equal ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector, Rails.autoloaders.main.inflector
+ assert_equal ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector, Rails.autoloaders.once.inflector
assert_raises(ArgumentError) { config.autoloader = :unknown }
end