diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-07 08:44:45 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-07 08:44:45 +0000 |
commit | 1df42597d15416357a20bd68700ce1a2d245e8bb (patch) | |
tree | f588f28559958e27464866d7b137955bfff04a6f /test/rubygems/test_gem_commands_unpack_command.rb | |
parent | fc634cc092f486adfc911f614b7b4aa2c48c698d (diff) | |
download | ruby-1df42597d15416357a20bd68700ce1a2d245e8bb.tar.gz |
cancel subversion backfire. sorry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_unpack_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_unpack_command.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/rubygems/test_gem_commands_unpack_command.rb b/test/rubygems/test_gem_commands_unpack_command.rb index 0fb4ef3843..8291a6b949 100644 --- a/test/rubygems/test_gem_commands_unpack_command.rb +++ b/test/rubygems/test_gem_commands_unpack_command.rb @@ -22,7 +22,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase assert_equal( @cmd.find_in_cache(@a1.file_name), - File.join(@gemhome, 'cache', @a1.file_name), + Gem.cache_gem(@a1.file_name, @gemhome), 'found a-1.gem in the cache' ) end @@ -34,7 +34,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase a1_data = nil - open File.join(@gemhome, 'cache', @a1.file_name), 'rb' do |fp| + open Gem.cache_gem(@a1.file_name, @gemhome), 'rb' do |fp| a1_data = fp.read end @@ -44,15 +44,15 @@ class TestGemCommandsUnpackCommand < Gem::TestCase dep = Gem::Dependency.new(@a1.name, @a1.version) assert_equal( @cmd.get_path(dep), - File.join(@gemhome, 'cache', @a1.file_name), + Gem.cache_gem(@a1.file_name, @gemhome), 'fetches a-1 and returns the cache path' ) - FileUtils.rm File.join(@gemhome, 'cache', @a1.file_name) + FileUtils.rm Gem.cache_gem(@a1.file_name, @gemhome) assert_equal( @cmd.get_path(dep), - File.join(@gemhome, 'cache', @a1.file_name), + Gem.cache_gem(@a1.file_name, @gemhome), 'when removed from cache, refetches a-1' ) end @@ -74,6 +74,8 @@ class TestGemCommandsUnpackCommand < Gem::TestCase def test_execute_gem_path util_make_gems + util_setup_spec_fetcher + util_setup_fake_fetcher Gem.clear_paths @@ -121,7 +123,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase util_clear_gems a2_data = nil - open File.join(@gemhome, 'cache', @a2.file_name), 'rb' do |fp| + open Gem.cache_gem(@a2.file_name, @gemhome), 'rb' do |fp| a2_data = fp.read end @@ -175,8 +177,8 @@ class TestGemCommandsUnpackCommand < Gem::TestCase end def test_execute_exact_match - foo_spec = quick_gem 'foo' - foo_bar_spec = quick_gem 'foo_bar' + foo_spec = quick_spec 'foo' + foo_bar_spec = quick_spec 'foo_bar' use_ui @ui do Dir.chdir @tempdir do |