1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] add login & logout for the signin & signout commands respectively

https://github.com/rubygems/rubygems/commit/49b491970b
This commit is contained in:
Colby Swandale 2021-12-04 18:25:43 +11:00 committed by git
parent e563c6068e
commit 9c0c66f721
2 changed files with 15 additions and 1 deletions

View file

@ -74,6 +74,8 @@ class Gem::CommandManager
ALIAS_COMMANDS = {
'i' => 'install',
'login' => 'signin',
'logout' => 'signout',
}.freeze
##

View file

@ -36,6 +36,18 @@ class TestGemCommandManager < Gem::TestCase
assert_kind_of Gem::Commands::InstallCommand, command
end
def test_find_login_alias_command
command = @command_manager.find_command 'login'
assert_kind_of Gem::Commands::SigninCommand, command
end
def test_find_logout_alias_comamnd
command = @command_manager.find_command 'logout'
assert_kind_of Gem::Commands::SignoutCommand, command
end
def test_find_command_ambiguous_exact
ins_command = Class.new
Gem::Commands.send :const_set, :InsCommand, ins_command