mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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:
parent
1800300296
commit
d0bb649cbf
1 changed files with 2 additions and 2 deletions
|
@ -225,10 +225,10 @@ class Rails::Command::ServerCommandTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_records_user_supplied_options
|
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]
|
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]
|
assert_equal [:Port], server_options[:user_supplied_options]
|
||||||
|
|
||||||
server_options = parse_arguments(["-p3001", "-C", "--binding", "127.0.0.1"])
|
server_options = parse_arguments(["-p3001", "-C", "--binding", "127.0.0.1"])
|
||||||
|
|
Loading…
Reference in a new issue