From 710377199de07e2be4df01ecbdc9067a3aa11861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 4 Aug 2017 16:39:16 -0400 Subject: 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. --- railties/test/railties/engine_test.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'railties/test') diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 6f762d2d3f..247c78db27 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -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 -- cgit v1.2.3