Use string for arguments in server test

When actually execute from the command, the value of ARGV is passed to the
server. So they are String. So let's use the same type in the test.

Also, this removes the following warning in Ruby 2.6.

```
lib/rails/commands/server/server_command.rb:195: warning: deprecated Object#=~ is called on Integer; it always returns nil
```
This commit is contained in:
yuuji.yaginuma 2018-12-13 16:14:13 +09:00
parent 1800300296
commit d0bb649cbf

@ -225,10 +225,10 @@ def test_argument_precedence_over_environment_variable
end
def test_records_user_supplied_options
server_options = parse_arguments(["-p", 3001])
server_options = parse_arguments(["-p", "3001"])
assert_equal [:Port], server_options[:user_supplied_options]
server_options = parse_arguments(["--port", 3001])
server_options = parse_arguments(["--port", "3001"])
assert_equal [:Port], server_options[:user_supplied_options]
server_options = parse_arguments(["-p3001", "-C", "--binding", "127.0.0.1"])