aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/deprecation_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/deprecation_test.rb')
-rw-r--r--activesupport/test/deprecation_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb
index ebfa405947..27e9573ce2 100644
--- a/activesupport/test/deprecation_test.rb
+++ b/activesupport/test/deprecation_test.rb
@@ -24,6 +24,11 @@ class Deprecatee
def d; end
def e; end
deprecate :a, :b, :c => :e, :d => "you now need to do something extra for this one"
+
+ module B
+ C = 1
+ end
+ A = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Deprecatee::A', 'Deprecatee::B::C')
end
@@ -83,6 +88,11 @@ class DeprecationTest < Test::Unit::TestCase
assert_not_deprecated { assert_equal @dtc.request.inspect, @dtc.old_request.inspect }
end
+ def test_deprecated_constant_proxy
+ assert_not_deprecated { Deprecatee::B::C }
+ assert_deprecated('Deprecatee::A') { assert_equal Deprecatee::B::C, Deprecatee::A }
+ end
+
def test_assert_deprecation_without_match
assert_deprecated do
@dtc.partially