diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/engine.rb | 6 | ||||
-rw-r--r-- | railties/test/railties/engine_test.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 7f53e2dc72..13629e0de3 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -200,11 +200,11 @@ module Rails @endpoint end - def isolated_engine_for(mod) - _engine = self + def namespace(mod) + _railtie = self mod.singleton_class.instance_eval do define_method(:_railtie) do - _engine + _railtie end end end diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 3d51d3cf2b..c845843095 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -338,11 +338,11 @@ module RailtiesTest assert_equal "/foo", response[2].body end - test "isolated engine should include only its own routes and helpers" do + test "namespaced engine should include only its own routes and helpers" do @plugin.write "lib/bukkits.rb", <<-RUBY module Bukkits class Engine < ::Rails::Engine - isolated_engine_for Bukkits + namespace Bukkits end end RUBY |