mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
Import RubyGems 1.0.0, r1575
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
40d8543fbd
commit
8289771e32
47 changed files with 1170 additions and 1010 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue