diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-14 08:59:02 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-14 08:59:02 +0000 |
commit | 269503b544247b5b3e30dbe60a0bab4f2ca00e4e (patch) | |
tree | a6d0a3a9b34017c4c84d997152a3aaf3086e1ce1 /test/rubygems/test_gem_commands_uninstall_command.rb | |
parent | 2614d9ba2fb5ad171200cccc88f42fa659b527c6 (diff) | |
download | ruby-269503b544247b5b3e30dbe60a0bab4f2ca00e4e.tar.gz |
Revert r42938 "* lib/rubygems: Update to RubyGems 2.1.3"
It breaks build.
http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20130913T200302Z.diff.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_uninstall_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_uninstall_command.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb index 844c7b4b97..9ba1371b79 100644 --- a/test/rubygems/test_gem_commands_uninstall_command.rb +++ b/test/rubygems/test_gem_commands_uninstall_command.rb @@ -16,6 +16,20 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase @executable = File.join(@gemhome, 'bin', 'executable') end + def test_execute_all_gem_names + @cmd.options[:args] = %w[a b] + @cmd.options[:all] = true + + assert_raises Gem::MockGemUi::TermError do + use_ui @ui do + @cmd.execute + end + end + + assert_match(/\A(?:WARNING: Unable to use symlinks on Windows, installing wrapper\n)?ERROR: Gem names and --all may not be used together\n\z/, + @ui.error) + end + def test_execute_dependency_order c = quick_gem 'c' do |spec| spec.add_dependency 'a' @@ -43,6 +57,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase def test_execute_removes_executable ui = Gem::MockGemUi.new + util_setup_gem ui build_rake_in do @@ -175,5 +190,32 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase assert Gem::Specification.find_all_by_name('x').length == 0 end + def test_execute_all + util_make_gems + + default = new_default_spec 'default', '1' + install_default_gems default + + gemhome2 = "#{@gemhome}2" + + a_4 = quick_spec 'a', 4 + install_gem a_4, :install_dir => gemhome2 + + Gem::Specification.dirs = [@gemhome, gemhome2] + + assert_includes Gem::Specification.all_names, 'a-1' + assert_includes Gem::Specification.all_names, 'a-4' + assert_includes Gem::Specification.all_names, 'default-1' + + @cmd.options[:all] = true + @cmd.options[:args] = [] + + use_ui @ui do + @cmd.execute + end + + assert_equal %w[a-4 default-1], Gem::Specification.all_names.sort + end + end |