Rename isolated_engine_for to namespace

This commit is contained in:
Piotr Sarnacki
2010-08-03 21:25:50 +02:00
parent 79bd92b783
commit a7c6fe4c2a
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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