aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-12-13 16:14:13 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-12-13 16:15:58 +0900
commitd0bb649cbf415093dd1cc3f08b7b746dab5ad32f (patch)
treef857b46539245d0a5451089a8631caa94cb7cefb /railties
parent18003002966cd047538ac9f8fc96d5a187be374e (diff)
downloadrails-d0bb649cbf415093dd1cc3f08b7b746dab5ad32f.tar.gz
rails-d0bb649cbf415093dd1cc3f08b7b746dab5ad32f.tar.bz2
rails-d0bb649cbf415093dd1cc3f08b7b746dab5ad32f.zip
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 ```
Diffstat (limited to 'railties')
-rw-r--r--railties/test/commands/server_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb
index e5b1da6ea4..fbdd3f3ebb 100644
--- a/railties/test/commands/server_test.rb
+++ b/railties/test/commands/server_test.rb
@@ -225,10 +225,10 @@ class Rails::Command::ServerCommandTest < ActiveSupport::TestCase
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"])