aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-26 16:12:35 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-26 16:12:35 +0100
commitfc266d7ec2cf1d3f9daf585ea6b79b61467a175f (patch)
tree8e973fc165b4f6d793aff068cb984cf67aed0a75 /railties
parent0848c862f098d5fcaa0e11f979a4ce4a2139f6c0 (diff)
downloadrails-fc266d7ec2cf1d3f9daf585ea6b79b61467a175f.tar.gz
rails-fc266d7ec2cf1d3f9daf585ea6b79b61467a175f.tar.bz2
rails-fc266d7ec2cf1d3f9daf585ea6b79b61467a175f.zip
Revert "find railties and engines by name [4264 state:resolved]"
This reverts commit 7b8399b80cfff58cfe2313187ca3c803de8c8955.
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/railtie.rb4
-rw-r--r--railties/test/railties/railtie_test.rb25
2 files changed, 0 insertions, 29 deletions
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index b7f6c02503..f42985a904 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -33,10 +33,6 @@ module Rails
subclasses.map { |p| p.railtie_name }
end
- def named(name)
- subclasses.detect { |r| r.railtie_name == name }
- end
-
def log_subscriber(log_subscriber)
Rails::LogSubscriber.add(railtie_name, log_subscriber)
end
diff --git a/railties/test/railties/railtie_test.rb b/railties/test/railties/railtie_test.rb
index 9283482893..9fefb285b4 100644
--- a/railties/test/railties/railtie_test.rb
+++ b/railties/test/railties/railtie_test.rb
@@ -15,31 +15,6 @@ module RailtiesTest
@app ||= Rails.application
end
- test "name can be retrieved from namespaced railties" do
- module ActiveRailtie
- class Railtie < Rails::Railtie; end
- end
-
- assert_equal :active_railtie, ActiveRailtie::Railtie.railtie_name
- end
-
- test "can find railtie by name" do
- class TieA < Rails::Railtie; railtie_name :railtie_a; end
- class TieB < Rails::Railtie; railtie_name :railtie_b; end
- class EngineA < Rails::Engine; engine_name :engine_a; end
- class EngineB < Rails::Engine; engine_name :engine_b; end
-
- assert_equal TieA, Rails::Railtie.named(:railtie_a)
- assert_equal TieB, Rails::Railtie.named(:railtie_b)
- assert_nil Rails::Railtie.named(:railtie_x)
- assert_nil Rails::Railtie.named(:engine_a)
-
- assert_equal EngineA, Rails::Engine.named(:engine_a)
- assert_equal EngineB, Rails::Engine.named(:engine_b)
- assert_nil Rails::Engine.named(:engine_x)
- assert_nil Rails::Engine.named(:railtie_a)
- end
-
test "Rails::Railtie itself does not respond to config" do
assert !Rails::Railtie.respond_to?(:config)
end