diff options
Diffstat (limited to 'activesupport/test/deprecation_test.rb')
-rw-r--r-- | activesupport/test/deprecation_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index 5be93f3a1a..5f72fbf662 100644 --- a/activesupport/test/deprecation_test.rb +++ b/activesupport/test/deprecation_test.rb @@ -285,6 +285,16 @@ class DeprecationTest < ActiveSupport::TestCase end end + def test_deprecated_constant_with_custom_message + deprecator = deprecator_with_messages + + klass = Class.new + klass.const_set(:OLD, ActiveSupport::Deprecation::DeprecatedConstantProxy.new("klass::OLD", "Object", deprecator, message: "foo")) + + klass::OLD.to_s + assert_match "foo", deprecator.messages.last + end + def test_deprecated_instance_variable_with_instance_deprecator deprecator = deprecator_with_messages |