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_install_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_install_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_install_command.rb | 66 |
1 files changed, 2 insertions, 64 deletions
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb index f86d2837ea..caf52f147d 100644 --- a/test/rubygems/test_gem_commands_install_command.rb +++ b/test/rubygems/test_gem_commands_install_command.rb @@ -6,6 +6,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase def setup super + common_installer_setup @cmd = Gem::Commands::InstallCommand.new @cmd.options[:document] = [] @@ -168,8 +169,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase # This is needed because we need to exercise the cache path # within SpecFetcher - path = File.join Gem.user_home, '.gem', 'specs', "not-there.nothing%80", - "latest_specs.4.8" + path = File.join Gem.spec_cache_dir, "not-there.nothing%80", "latest_specs.4.8" FileUtils.mkdir_p File.dirname(path) @@ -633,67 +633,6 @@ ERROR: Possible alternatives: non_existent_with_hint assert_equal x, e end - def test_execute_installs_dependencies - r, r_gem = util_gem 'r', '1', 'q' => '= 1' - q, q_gem = util_gem 'q', '1' - - util_setup_fake_fetcher - util_setup_spec_fetcher r, q - - Gem::Specification.reset - - @fetcher.data["#{@gem_repo}gems/#{q.file_name}"] = read_binary(q_gem) - @fetcher.data["#{@gem_repo}gems/#{r.file_name}"] = read_binary(r_gem) - - @cmd.options[:args] = ["r"] - - e = nil - use_ui @ui do - e = assert_raises Gem::SystemExitException do - capture_io do - @cmd.execute - end - end - end - - out = @ui.output.split "\n" - assert_equal "2 gems installed", out.shift - assert out.empty?, out.inspect - - assert_equal %w[q-1 r-1], @cmd.installed_specs.map { |spec| spec.full_name } - - assert_equal 0, e.exit_code - end - - def test_execute_satisfy_deps_of_local_from_sources - r, r_gem = util_gem 'r', '1', 'q' => '= 1' - q, q_gem = util_gem 'q', '1' - - util_setup_fake_fetcher - util_setup_spec_fetcher r, q - - Gem::Specification.reset - - @fetcher.data["#{@gem_repo}gems/#{q.file_name}"] = read_binary(q_gem) - - @cmd.options[:args] = [r_gem] - - use_ui @ui do - e = assert_raises Gem::SystemExitException do - capture_io do - @cmd.execute - end - end - assert_equal 0, e.exit_code - end - - assert_equal %w[q-1 r-1], @cmd.installed_specs.map { |spec| spec.full_name } - - out = @ui.output.split "\n" - assert_equal "2 gems installed", out.shift - assert out.empty?, out.inspect - end - def test_execute_uses_from_a_gemdeps util_setup_fake_fetcher util_setup_spec_fetcher @@ -951,4 +890,3 @@ ERROR: Possible alternatives: non_existent_with_hint end - |