diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 22:40:06 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 22:40:06 +0000 |
commit | 8cc45aae947d453acca029e13eb64f3f5f0bf942 (patch) | |
tree | f9485a20c99defe1aae3f32555a41d23c2298ad8 /test/rubygems/test_gem_commands_unpack_command.rb | |
parent | dc8359969ec71ece10357ba9396430db7f029e45 (diff) | |
download | ruby-8cc45aae947d453acca029e13eb64f3f5f0bf942.tar.gz |
Import RubyGems 1.1.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15873 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 | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_commands_unpack_command.rb b/test/rubygems/test_gem_commands_unpack_command.rb index 427f9403c3..3a62a914a4 100644 --- a/test/rubygems/test_gem_commands_unpack_command.rb +++ b/test/rubygems/test_gem_commands_unpack_command.rb @@ -17,15 +17,57 @@ class TestGemCommandsUnpackCommand < RubyGemTestCase @cmd.options[:args] = %w[a] - use_ui @ui do - Dir.chdir @tempdir do - @cmd.execute - end + use_ui @ui do + Dir.chdir @tempdir do + @cmd.execute + end + end + + assert File.exist?(File.join(@tempdir, 'a-2')) + end + + def test_execute_gem_path + util_make_gems + + Gem.clear_paths + + gemhome2 = File.join @tempdir, 'gemhome2' + + Gem.send :set_paths, [gemhome2, @gemhome].join(File::PATH_SEPARATOR) + Gem.send :set_home, gemhome2 + + @cmd.options[:args] = %w[a] + + use_ui @ui do + Dir.chdir @tempdir do + @cmd.execute end + end assert File.exist?(File.join(@tempdir, 'a-2')) end + def test_execute_gem_path_missing + util_make_gems + + Gem.clear_paths + + gemhome2 = File.join @tempdir, 'gemhome2' + + Gem.send :set_paths, [gemhome2, @gemhome].join(File::PATH_SEPARATOR) + Gem.send :set_home, gemhome2 + + @cmd.options[:args] = %w[z] + + use_ui @ui do + Dir.chdir @tempdir do + @cmd.execute + end + end + + assert_equal '', @ui.output + end + def test_execute_with_target_option util_make_gems |