aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_install_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-22 02:06:02 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-22 02:06:02 +0000
commitcb8be30ef1fb54d31529ce9f22bfc1768d19ba92 (patch)
tree7fabf6d38023d46642c430d754504e68cad80bf8 /test/rubygems/test_gem_commands_install_command.rb
parent87923e02ba0e19f54d9fe0f7b66c4308fbe734bf (diff)
downloadruby-cb8be30ef1fb54d31529ce9f22bfc1768d19ba92.tar.gz
* lib/rubygems/commands/install_command.rb: Restore gem install
--ignore-dependencies for remote gems * test/rubygems/test_gem_commands_install_command.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_install_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 32f6fc4237..00bbf7bae7 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -533,6 +533,32 @@ ERROR: Possible alternatives: non_existent_with_hint
assert_match "1 gem installed", @ui.output
end
+ def test_install_gem_ignore_dependencies_both
+ spec = quick_spec 'a', 2
+
+ util_build_gem spec
+
+ FileUtils.mv spec.cache_file, @tempdir
+
+ @cmd.options[:ignore_dependencies] = true
+
+ @cmd.install_gem 'a', '>= 0'
+
+ assert_equal %w[a-2], @cmd.installed_specs.map { |s| s.full_name }
+ end
+
+ def test_install_gem_ignore_dependencies_remote
+ spec_fetcher do |fetcher|
+ fetcher.gem 'a', 2
+ end
+
+ @cmd.options[:ignore_dependencies] = true
+
+ @cmd.install_gem 'a', '>= 0'
+
+ assert_equal %w[a-2], @cmd.installed_specs.map { |spec| spec.full_name }
+ end
+
def test_parses_requirement_from_gemname
spec_fetcher do |fetcher|
fetcher.gem 'a', 2