aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2018-07-07 10:09:45 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2018-07-07 10:21:29 +0200
commit161ed37d7120e1f391eed19e49a3390e53e4fe91 (patch)
tree6466c02cb6afbcc36ee2f3c203cc6ad2834781a5 /railties/test
parent688e48d93d7e4d7d66a726e024e1a262bbf31b17 (diff)
downloadrails-161ed37d7120e1f391eed19e49a3390e53e4fe91.tar.gz
rails-161ed37d7120e1f391eed19e49a3390e53e4fe91.tar.bz2
rails-161ed37d7120e1f391eed19e49a3390e53e4fe91.zip
Don't show unneeded deprecation warning on server restart.
If booting a server via `rails s -u puma`, we'd convert the option to a `using` positional. When using `rails restart` our `restart_command` would the option converted to the using positional and put that in the restart command. Thus we'd show users deprecation warnings for our own code. Fix that by converting a passed positional to an option instead. Also: fix initialize method signature. The local_options are an array, not a hash. But don't even bother assigning defaults as Thor passes them in.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/commands/server_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb
index e7a56b3e6d..a20fece960 100644
--- a/railties/test/commands/server_test.rb
+++ b/railties/test/commands/server_test.rb
@@ -245,10 +245,9 @@ class Rails::Command::ServerCommandTest < ActiveSupport::TestCase
args = %w(-p 4567 -b 127.0.0.1 -c dummy_config.ru -d -e test -P tmp/server.pid -C)
ARGV.replace args
- options = parse_arguments(args)
- expected = "bin/rails server -p 4567 -b 127.0.0.1 -c dummy_config.ru -d -e test -P tmp/server.pid -C --restart"
+ expected = "bin/rails server -p 4567 -b 127.0.0.1 -c dummy_config.ru -d -e test -P tmp/server.pid -C --restart"
- assert_equal expected, options[:restart_cmd]
+ assert_equal expected, parse_arguments(args)[:restart_cmd]
ensure
ARGV.replace original_args
end