1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make this test stronger

We test the inflections for both autoloaders, but we can
also autoload the constant as a sort of integration test.
This commit is contained in:
Xavier Noria 2019-02-23 15:25:42 -08:00
parent 15da1fb35b
commit e87a833c97

View file

@ -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