aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/reloadable.rb2
-rw-r--r--activesupport/test/reloadable_test.rb16
2 files changed, 9 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/reloadable.rb b/activesupport/lib/active_support/reloadable.rb
index c71b2fa4bd..3fd13e3d0f 100644
--- a/activesupport/lib/active_support/reloadable.rb
+++ b/activesupport/lib/active_support/reloadable.rb
@@ -19,7 +19,7 @@ module Reloadable
# Captures the common pattern where a base class should not be reloaded,
# but its subclasses should be.
- module OnlySubclasses
+ module Subclasses
def self.included(base) #nodoc:
base.send :include, Reloadable
(class << base; self; end).send(:define_method, :reloadable?) do
diff --git a/activesupport/test/reloadable_test.rb b/activesupport/test/reloadable_test.rb
index 8366471e4a..1b147e0d18 100644
--- a/activesupport/test/reloadable_test.rb
+++ b/activesupport/test/reloadable_test.rb
@@ -25,14 +25,14 @@ module ReloadableTestSandbox
include Reloadable
end
- class OnlySubclassesReloadable
- include Reloadable::OnlySubclasses
+ class SubclassesReloadable
+ include Reloadable::Subclasses
end
- class ASubclassOfOnlySubclassesReloadable < OnlySubclassesReloadable
+ class ASubclassOfSubclassesReloadable < SubclassesReloadable
end
class AnOnlySubclassReloadableClassSubclassingAReloadableClass
- include Reloadable::OnlySubclasses
+ include Reloadable::Subclasses
end
class ASubclassofAOnlySubclassReloadableClassWhichWasSubclassingAReloadableClass < AnOnlySubclassReloadableClassSubclassingAReloadableClass
@@ -51,8 +51,8 @@ class ReloadableTest < Test::Unit::TestCase
end
def test_only_subclass_reloadable
- assert ! ReloadableTestSandbox::OnlySubclassesReloadable.reloadable?
- assert ReloadableTestSandbox::ASubclassOfOnlySubclassesReloadable.reloadable?
+ assert ! ReloadableTestSandbox::SubclassesReloadable.reloadable?
+ assert ReloadableTestSandbox::ASubclassOfSubclassesReloadable.reloadable?
end
def test_inside_hierarchy_only_subclass_reloadable
@@ -66,11 +66,11 @@ class ReloadableTest < Test::Unit::TestCase
AReloadableClassWithSubclasses
AReloadableSubclass
AClassWhichDefinesItsOwnReloadable
- ASubclassOfOnlySubclassesReloadable
+ ASubclassOfSubclassesReloadable
)
non_reloadables = %w(
ANonReloadableSubclass
- OnlySubclassesReloadable
+ SubclassesReloadable
)
results = Reloadable.reloadable_classes