aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_deprecate.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-02-01 11:14:04 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-02-01 11:14:57 +0900
commit600a715c9bde99fe2e9a669465d78833445273e8 (patch)
tree8244622e8cc02b40dd0dad29d30fc60a11342396 /test/rubygems/test_deprecate.rb
parentadc303131187654d8ce83f3db17eefa3d5bae26c (diff)
downloadruby-600a715c9bde99fe2e9a669465d78833445273e8.tar.gz
Merge the current master branch of rubygems/rubygems.
Just started to develop RubyGems 3.2.0.
Diffstat (limited to 'test/rubygems/test_deprecate.rb')
-rw-r--r--test/rubygems/test_deprecate.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rubygems/test_deprecate.rb b/test/rubygems/test_deprecate.rb
index b92bd1c3da..f5cd83ee89 100644
--- a/test/rubygems/test_deprecate.rb
+++ b/test/rubygems/test_deprecate.rb
@@ -77,4 +77,22 @@ class TestDeprecate < Gem::TestCase
assert_match(/on or after 2099-03-01/, err)
end
+ def test_deprecate_command
+ require 'rubygems/command'
+ foo_command = Class.new(Gem::Command) do
+ extend Gem::Deprecate
+
+ deprecate_command(2099, 4)
+
+ def execute
+ puts "pew pew!"
+ end
+ end
+
+ Gem::Commands.send(:const_set, :FooCommand, foo_command)
+ assert Gem::Commands::FooCommand.new("foo").deprecated?
+ ensure
+ Gem::Commands.send(:remove_const, :FooCommand)
+ end
+
end