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:
parent
15da1fb35b
commit
e87a833c97
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue