[rubygems/rubygems] add message when gems are requested to be updated but they are not installed
https://github.com/rubygems/rubygems/commit/27953ffe9a
This commit is contained in:
parent
6eab8095fa
commit
902d1a5c51
@ -130,6 +130,7 @@ command to remove old versions.
|
||||
say "Gems updated: #{updated_names.join(' ')}"
|
||||
end
|
||||
say "Gems already up-to-date: #{up_to_date_names.join(' ')}" unless up_to_date_names.empty?
|
||||
say "Gems not currently installed: #{not_installed_names.join(' ')}" unless not_installed_names.empty?
|
||||
end
|
||||
|
||||
def fetch_remote_gems(spec) # :nodoc:
|
||||
|
@ -812,4 +812,24 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
||||
assert_equal " a-2", out.shift
|
||||
assert_empty out
|
||||
end
|
||||
|
||||
def test_execute_named_not_installed_and_no_update
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.spec 'a', 2
|
||||
end
|
||||
|
||||
@cmd.options[:args] = %w[a b]
|
||||
|
||||
use_ui @ui do
|
||||
@cmd.execute
|
||||
end
|
||||
|
||||
out = @ui.output.split "\n"
|
||||
assert_equal "Updating installed gems", out.shift
|
||||
assert_equal "Nothing to update", out.shift
|
||||
assert_equal "Gems already up-to-date: a", out.shift
|
||||
assert_equal "Gems not currently installed: b", out.shift
|
||||
|
||||
assert_empty out
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user