mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge rubygems-2.7.3.
http://blog.rubygems.org/2017/11/28/2.7.3-released.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
89bfee6fd4
commit
e82802070a
9 changed files with 212 additions and 23 deletions
|
@ -32,6 +32,21 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
|
|||
assert @cmd.options[:dryrun]
|
||||
end
|
||||
|
||||
def test_handle_options_check_development
|
||||
@cmd.handle_options []
|
||||
assert @cmd.options[:check_dev]
|
||||
|
||||
%w[-D --check-development].each do |options|
|
||||
@cmd.handle_options [options]
|
||||
assert @cmd.options[:check_dev]
|
||||
end
|
||||
|
||||
%w[--no-check-development].each do |options|
|
||||
@cmd.handle_options [options]
|
||||
refute @cmd.options[:check_dev]
|
||||
end
|
||||
end
|
||||
|
||||
def test_execute
|
||||
@cmd.options[:args] = %w[a]
|
||||
|
||||
|
@ -55,6 +70,34 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
|
|||
refute_path_exists @b_1.gem_dir
|
||||
end
|
||||
|
||||
def test_execute_dev_dependencies
|
||||
@b_1 = util_spec 'b', 1 do |s| s.add_development_dependency 'a', '1' end
|
||||
@c_1 = util_spec 'c', 1 do |s| s.add_development_dependency 'a', '2' end
|
||||
|
||||
install_gem @b_1
|
||||
install_gem @c_1
|
||||
|
||||
@cmd.handle_options %w[--check-development]
|
||||
|
||||
@cmd.execute
|
||||
|
||||
assert_path_exists @a_1.gem_dir
|
||||
end
|
||||
|
||||
def test_execute_without_dev_dependencies
|
||||
@b_1 = util_spec 'b', 1 do |s| s.add_development_dependency 'a', '1' end
|
||||
@c_1 = util_spec 'c', 1 do |s| s.add_development_dependency 'a', '2' end
|
||||
|
||||
install_gem @b_1
|
||||
install_gem @c_1
|
||||
|
||||
@cmd.handle_options %w[--no-check-development]
|
||||
|
||||
@cmd.execute
|
||||
|
||||
refute_path_exists @a_1.gem_dir
|
||||
end
|
||||
|
||||
def test_execute_all
|
||||
gemhome2 = File.join @tempdir, 'gemhome2'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue