aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_pristine_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_commands_pristine_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb
index 38e00bb1cc..ec5f3ad186 100644
--- a/test/rubygems/test_gem_commands_pristine_command.rb
+++ b/test/rubygems/test_gem_commands_pristine_command.rb
@@ -225,6 +225,28 @@ class TestGemCommandsPristineCommand < Gem::TestCase
assert_empty out, out.inspect
end
+ def test_skip
+ a = util_spec 'a'
+ b = util_spec 'b'
+
+ install_gem a
+ install_gem b
+
+ @cmd.options[:args] = %w[a b]
+ @cmd.options[:skip] = 'a'
+
+ use_ui @ui do
+ @cmd.execute
+ end
+
+ out = @ui.output.split "\n"
+
+ assert_equal "Restoring gems to pristine condition...", out.shift
+ assert_equal "Skipped #{a.full_name}, it was given through options", out.shift
+ assert_equal "Restored #{b.full_name}", out.shift
+ assert_empty out, out.inspect
+ end
+
def test_execute_many_multi_repo
a = util_spec 'a'
install_gem a