diff options
-rw-r--r-- | railties/lib/rails/railtie.rb | 4 | ||||
-rw-r--r-- | railties/test/railties/railtie_test.rb | 25 |
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 |