diff options
Diffstat (limited to 'test/rubygems/test_gem_commands_install_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_install_command.rb | 27 |
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 |