aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_install_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-16 00:43:14 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-16 00:43:14 +0000
commit33d1f172c839bc14ba71a8e74f5ca6b01b7e069b (patch)
treee3f855133bb072667c588712dc86ea51a4092118 /test/rubygems/test_gem_commands_install_command.rb
parent28918eac58eb6e2681d10839ac0d1430b2a4f1f9 (diff)
downloadruby-33d1f172c839bc14ba71a8e74f5ca6b01b7e069b.tar.gz
* lib/rubygems: Update to RubyGems master 278d00d. Changes:
Fixes building extensions without a "clean" make rule Adds gem dependency file autodetection to "gem install -g" * test/rubygems: Tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43299 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.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 1008033b6c..24159e4c71 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -866,5 +866,32 @@ ERROR: Possible alternatives: non_existent_with_hint
assert_match "Installing r (2.0)", @ui.output
end
+ def test_handle_options_file
+ @cmd.handle_options %w[-g Gemfile]
+
+ assert_equal 'Gemfile', @cmd.options[:gemdeps]
+
+ @cmd.handle_options %w[--file gem.deps.rb]
+
+ assert_equal 'gem.deps.rb', @cmd.options[:gemdeps]
+
+ FileUtils.touch 'Isolate'
+
+ @cmd.handle_options %w[-g]
+
+ assert_equal 'Isolate', @cmd.options[:gemdeps]
+
+ FileUtils.touch 'Gemfile'
+
+ @cmd.handle_options %w[-g]
+
+ assert_equal 'Gemfile', @cmd.options[:gemdeps]
+
+ FileUtils.touch 'gem.deps.rb'
+
+ @cmd.handle_options %w[-g]
+
+ assert_equal 'gem.deps.rb', @cmd.options[:gemdeps]
+ end
end