aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/deprecation_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-06-03 13:32:53 -0500
committerJoshua Peek <josh@joshpeek.com>2008-06-03 13:32:53 -0500
commitc08547d2266c75f0a82d06dd91c6d0500740e12e (patch)
treeafd294792deab652137c1d172e752882bbd91669 /activesupport/test/deprecation_test.rb
parentda91450e687fe9faa7b0575062c2b2aacc261f68 (diff)
downloadrails-c08547d2266c75f0a82d06dd91c6d0500740e12e.tar.gz
rails-c08547d2266c75f0a82d06dd91c6d0500740e12e.tar.bz2
rails-c08547d2266c75f0a82d06dd91c6d0500740e12e.zip
Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [#238 state:resolved]
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