Permalink
Browse files

Add test for #777

  • Loading branch information...
1 parent 0ea901c commit 67180db0b41da0ac5288e91792c6b26349b4ff86 @drbrain drbrain committed Feb 5, 2014
Showing with 24 additions and 0 deletions.
  1. +24 −0 test/rubygems/test_gem_commands_update_command.rb
@@ -266,6 +266,30 @@ def test_execute_named
assert_empty out
end
+ def test_execute_named_some_up_to_date
+ spec_fetcher do |fetcher|
+ fetcher.gem 'a', 2
+ fetcher.clear
+ fetcher.spec 'a', 1
+
+ fetcher.spec 'b', 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 "Updating a", out.shift
+ assert_equal "Gems updated: a", out.shift
+ assert_equal "Gems already up-to-date: b", out.shift
+
+ assert_empty out
+ end
+
def test_execute_named_up_to_date
spec_fetcher do |fetcher|
fetcher.spec 'a', 2

0 comments on commit 67180db

Please sign in to comment.