diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-10-09 20:59:20 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-10-09 21:32:34 +0200 |
commit | 5d5eb2b18d364cb27d2062668bd3b1921b1040a8 (patch) | |
tree | 519a7e779a9e914d183c9851a63f9ef8333a5d2b /railties/test | |
parent | afd76d7fe9bb5e1b90a3b1c75abe45488e871f72 (diff) | |
download | rails-5d5eb2b18d364cb27d2062668bd3b1921b1040a8.tar.gz rails-5d5eb2b18d364cb27d2062668bd3b1921b1040a8.tar.bz2 rails-5d5eb2b18d364cb27d2062668bd3b1921b1040a8.zip |
Rename namespace method to isolate_namespace.
This change caused by confusion caused by calling engine
"namespaced". Stuff inside engine can be namespaced for every
engine. This method is not actually namespacing anything, it's
isolating engine within the given namespace.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/namespaced_generators_test.rb | 4 | ||||
-rw-r--r-- | railties/test/railties/engine_test.rb | 16 | ||||
-rw-r--r-- | railties/test/railties/mounted_engine_test.rb | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index 38b95a49ac..d1190fd17d 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -6,14 +6,14 @@ require 'rails/generators/mailer/mailer_generator' class NamespacedGeneratorTestCase < Rails::Generators::TestCase def setup - TestApp::Application.namespace(TestApp) + TestApp::Application.isolate_namespace(TestApp) end def teardown if TestApp.respond_to?(:_railtie) TestApp.singleton_class.send(:undef_method, :_railtie) TestApp.singleton_class.send(:undef_method, :table_name_prefix) - TestApp::Application.namespaced = false + TestApp::Application.isolated = false end end end diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 0ce11b1f79..db74e41472 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -394,7 +394,7 @@ module RailtiesTest @plugin.write "lib/bukkits.rb", <<-RUBY module Bukkits class Engine < ::Rails::Engine - namespace Bukkits + isolate_namespace Bukkits end end RUBY @@ -511,7 +511,7 @@ module RailtiesTest @plugin.write "lib/bukkits.rb", <<-RUBY module Bukkits class Engine < ::Rails::Engine - namespace Bukkits + isolate_namespace Bukkits end end RUBY @@ -572,7 +572,7 @@ module RailtiesTest @plugin.write "lib/bukkits.rb", <<-RUBY module Bukkits class Engine < ::Rails::Engine - namespace(Bukkits) + isolate_namespace(Bukkits) end end RUBY @@ -593,7 +593,7 @@ module RailtiesTest @plugin.write "lib/bukkits.rb", <<-RUBY module Bukkits class Engine < ::Rails::Engine - namespace(Bukkits) + isolate_namespace(Bukkits) paths["public"] = "#{File.join(@plugin.path, "alternate_public")}" end end @@ -611,7 +611,7 @@ module RailtiesTest @plugin.write "lib/bukkits.rb", <<-RUBY module Bukkits class Engine < ::Rails::Engine - namespace(Bukkits) + isolate_namespace(Bukkits) paths["public"] = "#{File.join(@plugin.path, "not_existing")}" end end @@ -648,12 +648,12 @@ module RailtiesTest @plugin.write "lib/bukkits.rb", <<-RUBY module AppTemplate class Engine < ::Rails::Engine - namespace(AppTemplate) + isolate_namespace(AppTemplate) end end RUBY - add_to_config "namespace AppTemplate" + add_to_config "isolate_namespace AppTemplate" app_file "config/routes.rb", <<-RUBY AppTemplate::Application.routes.draw do end @@ -686,7 +686,7 @@ module RailtiesTest @plugin.write "lib/bukkits.rb", <<-RUBY module Bukkits class Engine < ::Rails::Engine - namespace(Bukkits) + isolate_namespace(Bukkits) end end RUBY diff --git a/railties/test/railties/mounted_engine_test.rb b/railties/test/railties/mounted_engine_test.rb index b52ced92ec..47a4753e78 100644 --- a/railties/test/railties/mounted_engine_test.rb +++ b/railties/test/railties/mounted_engine_test.rb @@ -49,7 +49,7 @@ module ApplicationTests @plugin.write "lib/blog.rb", <<-RUBY module Blog class Engine < ::Rails::Engine - namespace(Blog) + isolate_namespace(Blog) end end RUBY |