aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_unpack_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 +0000
commit8289771e326006cc4e15a667e3eff3a72cfb3327 (patch)
treef6d367888b42848fd6a660fad57fa2020e38c097 /test/rubygems/test_gem_commands_unpack_command.rb
parent40d8543fbdec5485a638a2cb1008089d106b978d (diff)
downloadruby-8289771e326006cc4e15a667e3eff3a72cfb3327.tar.gz
Import RubyGems 1.0.0, r1575
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14361 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.rb22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_commands_unpack_command.rb b/test/rubygems/test_gem_commands_unpack_command.rb
index ff3d4e0eae..427f9403c3 100644
--- a/test/rubygems/test_gem_commands_unpack_command.rb
+++ b/test/rubygems/test_gem_commands_unpack_command.rb
@@ -7,7 +7,9 @@ class TestGemCommandsUnpackCommand < RubyGemTestCase
def setup
super
- @cmd = Gem::Commands::UnpackCommand.new
+ Dir.chdir @tempdir do
+ @cmd = Gem::Commands::UnpackCommand.new
+ end
end
def test_execute
@@ -15,13 +17,29 @@ class TestGemCommandsUnpackCommand < RubyGemTestCase
@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_with_target_option
+ util_make_gems
+
+ target = 'with_target'
+ @cmd.options[:args] = %w[a]
+ @cmd.options[:target] = target
+
use_ui @ui do
Dir.chdir @tempdir do
@cmd.execute
end
end
- assert File.exist?(File.join(@tempdir, 'a-0.0.2'))
+ assert File.exist?(File.join(@tempdir, target, 'a-2'))
end
def test_execute_exact_match