diff options
Diffstat (limited to 'railties/test/application/server_test.rb')
-rw-r--r-- | railties/test/application/server_test.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/railties/test/application/server_test.rb b/railties/test/application/server_test.rb index 6db9a3b9e8..f3a7e00a4d 100644 --- a/railties/test/application/server_test.rb +++ b/railties/test/application/server_test.rb @@ -29,12 +29,17 @@ module ApplicationTests server.app log = File.read(Rails.application.config.paths["log"].first) - assert_match(/DEPRECATION WARNING: Use `Rails::Application` subclass to start the server is deprecated/, log) + 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? + File.open("#{app_path}/config/boot.rb", "w") do |f| + f.puts "ENV['BUNDLE_GEMFILE'] = '#{Bundler.default_gemfile.to_s}'" + f.puts "require 'bundler/setup'" + end + master, slave = PTY.open pid = nil @@ -42,7 +47,7 @@ module ApplicationTests pid = Process.spawn("#{app_path}/bin/rails server -P tmp/dummy.pid", in: slave, out: slave, err: slave) assert_output("Listening", master) - Dir.chdir(app_path) { system("bin/rails restart") } + rails("restart") assert_output("Restarting", master) assert_output("Inherited", master) |