diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-04 16:39:16 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-04 16:39:16 -0400 |
commit | 710377199de07e2be4df01ecbdc9067a3aa11861 (patch) | |
tree | 82a4c04cb5040f6ad6214d4363f2b7a5ad753061 | |
parent | 787fe90dc0a7c5b91bb5af51f2858ea8c4676268 (diff) | |
download | rails-710377199de07e2be4df01ecbdc9067a3aa11861.tar.gz rails-710377199de07e2be4df01ecbdc9067a3aa11861.tar.bz2 rails-710377199de07e2be4df01ecbdc9067a3aa11861.zip |
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.
-rw-r--r-- | railties/test/railties/engine_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
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 |