aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorYuji Yaginuma <yuuji.yaginuma@gmail.com>2018-12-12 15:52:08 +0900
committerGitHub <noreply@github.com>2018-12-12 15:52:08 +0900
commitc4f37cc8c5a3b1de5746146a0f65b22d418cfef4 (patch)
treef2b257d8d1ba9163482096fcdde3196782a665a2 /activesupport/test
parent574234402433065e08a407be7cbdc900e5e0f1a3 (diff)
parent59ff1ba30d9f4d34b4d478104cc3f453e553c67a (diff)
downloadrails-c4f37cc8c5a3b1de5746146a0f65b22d418cfef4.tar.gz
rails-c4f37cc8c5a3b1de5746146a0f65b22d418cfef4.tar.bz2
rails-c4f37cc8c5a3b1de5746146a0f65b22d418cfef4.zip
Merge pull request #34648 from y-yagi/fixes_34646
Make `deprecate` work for non-exists methods
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/deprecation_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb
index 105153584d..95e7174391 100644
--- a/activesupport/test/deprecation_test.rb
+++ b/activesupport/test/deprecation_test.rb
@@ -31,6 +31,9 @@ class Deprecatee
def f=(v); end
deprecate :f=
+ deprecate :g
+ def g ;end
+
module B
C = 1
end
@@ -425,6 +428,10 @@ class DeprecationTest < ActiveSupport::TestCase
end
end
+ def test_deprecate_work_before_define_method
+ assert_deprecated { @dtc.g }
+ end
+
private
def deprecator_with_messages
klass = Class.new(ActiveSupport::Deprecation)