diff options
author | Xavier Noria <fxn@hashref.com> | 2019-02-23 15:25:42 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2019-02-23 15:27:24 -0800 |
commit | e87a833c9720bc2cc445348391a7b52692c9c7fb (patch) | |
tree | 76eec6cc2d59d33c7608d48bf6e28ab4b4f48c3c /railties | |
parent | 15da1fb35b41a94bdd6b75b249f83572400843d7 (diff) | |
download | rails-e87a833c9720bc2cc445348391a7b52692c9c7fb.tar.gz rails-e87a833c9720bc2cc445348391a7b52692c9c7fb.tar.bz2 rails-e87a833c9720bc2cc445348391a7b52692c9c7fb.zip |
Make this test stronger
We test the inflections for both autoloaders, but we can
also autoload the constant as a sort of integration test.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/zeitwerk_integration_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/application/zeitwerk_integration_test.rb b/railties/test/application/zeitwerk_integration_test.rb index db6c7816c7..cddbf5a22d 100644 --- a/railties/test/application/zeitwerk_integration_test.rb +++ b/railties/test/application/zeitwerk_integration_test.rb @@ -54,6 +54,11 @@ class ZeitwerkIntegrationTest < ActiveSupport::TestCase end RUBY + app_file "app/controllers/restful_controller.rb", <<-RUBY + class RESTfulController < ApplicationController + end + RUBY + boot basename = "restful_controller" @@ -63,6 +68,8 @@ class ZeitwerkIntegrationTest < ActiveSupport::TestCase Rails.autoloaders.each do |autoloader| assert_equal camelized, autoloader.inflector.camelize(basename, abspath) end + + assert RESTfulController end test "constantize returns the value stored in the constant" do |