mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
2614d9ba2f
commit
269503b544
110 changed files with 4928 additions and 3479 deletions
|
|
@ -7,6 +7,7 @@ class TestGemGemRunner < Gem::TestCase
|
|||
super
|
||||
|
||||
@orig_args = Gem::Command.build_args
|
||||
@runner = Gem::GemRunner.new
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
|
@ -41,23 +42,26 @@ class TestGemGemRunner < Gem::TestCase
|
|||
assert_equal %w[--commands], Gem::Command.extra_args
|
||||
end
|
||||
|
||||
def test_build_args_are_handled
|
||||
Gem.clear_paths
|
||||
def test_extract_build_args
|
||||
args = %w[]
|
||||
assert_equal [], @runner.extract_build_args(args)
|
||||
assert_equal %w[], args
|
||||
|
||||
cls = Class.new(Gem::Command) do
|
||||
def execute
|
||||
end
|
||||
end
|
||||
args = %w[foo]
|
||||
assert_equal [], @runner.extract_build_args(args)
|
||||
assert_equal %w[foo], args
|
||||
|
||||
test_obj = cls.new :ba_test
|
||||
args = %w[--foo]
|
||||
assert_equal [], @runner.extract_build_args(args)
|
||||
assert_equal %w[--foo], args
|
||||
|
||||
cmds = Gem::CommandManager.new
|
||||
cmds.register_command :ba_test, test_obj
|
||||
args = %w[--foo --]
|
||||
assert_equal [], @runner.extract_build_args(args)
|
||||
assert_equal %w[--foo], args
|
||||
|
||||
runner = Gem::GemRunner.new :command_manager => cmds
|
||||
runner.run(%W[ba_test -- --build_arg1 --build_arg2])
|
||||
|
||||
assert_equal %w[--build_arg1 --build_arg2], test_obj.options[:build_args]
|
||||
args = %w[--foo -- --bar]
|
||||
assert_equal %w[--bar], @runner.extract_build_args(args)
|
||||
assert_equal %w[--foo], args
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue