diff options
-rw-r--r-- | test/rubygems/test_gem_commands_pristine_command.rb | 36 |
1 files changed, 28 insertions, 8 deletions
@@ -15,7 +15,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase end def test_execute - a = quick_gem 'a' do |s| s.executables = %w[foo] end FileUtils.mkdir_p File.join(@tempdir, 'bin') File.open File.join(@tempdir, 'bin', 'foo'), 'w' do |fp| fp.puts "#!/usr/bin/ruby" @@ -45,7 +45,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase end def test_execute_all - a = quick_gem 'a' do |s| s.executables = %w[foo] end FileUtils.mkdir_p File.join(@tempdir, 'bin') File.open File.join(@tempdir, 'bin', 'foo'), 'w' do |fp| fp.puts "#!/usr/bin/ruby" @@ -73,15 +73,29 @@ class TestGemCommandsPristineCommand < Gem::TestCase end def test_execute_missing_cache_gem - a = quick_gem 'a' do |s| s.executables = %w[foo] end FileUtils.mkdir_p File.join(@tempdir, 'bin') File.open File.join(@tempdir, 'bin', 'foo'), 'w' do |fp| fp.puts "#!/usr/bin/ruby" end install_gem a - FileUtils.rm File.join(@gemhome, 'cache', a.file_name) @cmd.options[:args] = %w[a] @@ -91,11 +105,17 @@ class TestGemCommandsPristineCommand < Gem::TestCase out = @ui.output.split "\n" - assert_equal "Restoring gem\(s\) to pristine condition...", out.shift - assert_empty out, out.inspect - assert_equal "ERROR: Cached gem for #{a.full_name} not found, use `gem install` to restore\n", - @ui.error end def test_execute_no_gem |