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:
parent
e563c6068e
commit
9c0c66f721
2 changed files with 15 additions and 1 deletions
|
@ -73,7 +73,9 @@ class Gem::CommandManager
|
|||
].freeze
|
||||
|
||||
ALIAS_COMMANDS = {
|
||||
'i' => 'install',
|
||||
'i' => 'install',
|
||||
'login' => 'signin',
|
||||
'logout' => 'signout',
|
||||
}.freeze
|
||||
|
||||
##
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue