summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_server_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_commands_server_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_server_command.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_commands_server_command.rb b/test/rubygems/test_gem_commands_server_command.rb
index 5b4faae06e..780e542036 100644
--- a/test/rubygems/test_gem_commands_server_command.rb
+++ b/test/rubygems/test_gem_commands_server_command.rb
@@ -13,16 +13,23 @@ class TestGemCommandsServerCommand < RubyGemTestCase
@cmd.send :handle_options, %w[-p 8808 --no-daemon]
assert_equal false, @cmd.options[:daemon]
- assert_equal @gemhome, @cmd.options[:gemdir]
+ assert_equal [], @cmd.options[:gemdir]
assert_equal 8808, @cmd.options[:port]
@cmd.send :handle_options, %w[-p 9999 -d /nonexistent --daemon]
assert_equal true, @cmd.options[:daemon]
- assert_equal File.expand_path('/nonexistent'), @cmd.options[:gemdir]
+ assert_equal [File.expand_path('/nonexistent')], @cmd.options[:gemdir]
assert_equal 9999, @cmd.options[:port]
end
+ def test_handle_options_gemdir
+ @cmd.send :handle_options, %w[--dir a --dir b]
+
+ assert_equal [File.expand_path('a'), File.expand_path('b')],
+ @cmd.options[:gemdir]
+ end
+
def test_handle_options_port
@cmd.send :handle_options, %w[-p 0]
assert_equal 0, @cmd.options[:port]