diff options
Diffstat (limited to 'railties/test/application/server_test.rb')
-rw-r--r-- | railties/test/application/server_test.rb | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/railties/test/application/server_test.rb b/railties/test/application/server_test.rb index 92b991dd05..5fe1b4e6e7 100644 --- a/railties/test/application/server_test.rb +++ b/railties/test/application/server_test.rb @@ -18,20 +18,6 @@ module ApplicationTests teardown_app end - test "deprecate support of older `config.ru`" do - remove_file "config.ru" - app_file "config.ru", <<-RUBY - require_relative 'config/environment' - run AppTemplate::Application - RUBY - - server = Rails::Server.new(config: "#{app_path}/config.ru") - server.app - - log = File.read(Rails.application.config.paths["log"].first) - assert_match(/DEPRECATION WARNING: Using `Rails::Application` subclass to start the server is deprecated/, log) - end - test "restart rails server with custom pid file path" do skip "PTY unavailable" unless available_pty? @@ -40,17 +26,17 @@ module ApplicationTests f.puts "require 'bundler/setup'" end - master, slave = PTY.open + primary, replica = PTY.open pid = nil - begin - pid = Process.spawn("#{app_path}/bin/rails server -P tmp/dummy.pid", in: slave, out: slave, err: slave) - assert_output("Listening", master) + Bundler.with_original_env do + pid = Process.spawn("bin/rails server -b localhost -P tmp/dummy.pid", chdir: app_path, in: replica, out: replica, err: replica) + assert_output("Listening", primary) rails("restart") - assert_output("Restarting", master) - assert_output("Inherited", master) + assert_output("Restarting", primary) + assert_output("tcp://localhost:3000", primary) ensure kill(pid) if pid end |