aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/deprecation_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-03 22:38:27 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-03 22:38:27 -0700
commit53bcbfbdc1eed45cc6615e59d36baf018ab43d96 (patch)
tree691441d50ef7e49b5317ce279329bcaa1d135744 /activesupport/test/deprecation_test.rb
parentf55ad960d22337d0d92a93724f1cc3ad45200836 (diff)
parent82e96eb294ae21528c3e05e91c05c7ee5222afbd (diff)
downloadrails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.tar.gz
rails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.tar.bz2
rails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.zip
Merge branch 'master' into erbout
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