summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_update_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_commands_update_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index fa444fa32f..549e34c218 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -217,7 +217,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
end
def test_execute_rdoc
- skip if RUBY_VERSION <= "1.8.7"
spec_fetcher do |fetcher|
fetcher.download 'a', 2
fetcher.spec 'a', 1
@@ -504,5 +503,23 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
assert_empty arguments
end
-end
+ def test_explain
+ spec_fetcher do |fetcher|
+ fetcher.download 'a', 2
+ fetcher.spec 'a', 1
+ end
+
+ @cmd.options[:explain] = true
+ @cmd.options[:args] = %w[a]
+
+ use_ui @ui do
+ @cmd.execute
+ end
+
+ out = @ui.output.split "\n"
+ assert_equal "Gems to update:", out.shift
+ assert_equal " a-2", out.shift
+ assert_empty out
+ end
+end