diff options
-rw-r--r-- | lib/rubygems/commands/update_command.rb | 1 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_update_command.rb | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index 59e020fd63..04ce0ea935 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -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: diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb index acb60a7583..1d8dcb2e64 100644 --- a/test/rubygems/test_gem_commands_update_command.rb +++ b/test/rubygems/test_gem_commands_update_command.rb @@ -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 |