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

Do not call isolate_namespace on the application

What we want to test is that two different calls to isolate_namespace
with the same module doesn't change the original railtie. We can do that
defining two different railties.

We can't call in the application because this method is not supposed to
be called in an Application class.
This commit is contained in:
Rafael Mendonça França 2017-08-04 16:39:16 -04:00
parent 787fe90dc0
commit 710377199d

View file

@ -882,7 +882,15 @@ YAML
end
RUBY
add_to_config "isolate_namespace AppTemplate"
@plugin.write "lib/new_lugin.rb", <<-RUBY
module AppTemplate
module NewPlugin
class Engine < ::Rails::Engine
isolate_namespace(AppTemplate)
end
end
end
RUBY
app_file "config/routes.rb", <<-RUBY
Rails.application.routes.draw do end