From 7812f257413c36f2be122796f9ce3d0904ea0003 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Fri, 13 Nov 2009 21:22:41 -0500 Subject: [PATCH] Don't blow up if PID doesn't exist at the end --- spec/integration/mechanize/spec/spec_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/integration/mechanize/spec/spec_helper.rb b/spec/integration/mechanize/spec/spec_helper.rb index 038ae76..95ad24a 100644 --- a/spec/integration/mechanize/spec/spec_helper.rb +++ b/spec/integration/mechanize/spec/spec_helper.rb @@ -21,7 +21,9 @@ Spec::Runner.configure do |config| end config.after :suite do - Process.kill("TERM", File.read("rack.pid").to_i) + if File.exists?("rack.pid") + Process.kill("TERM", File.read("rack.pid").to_i) + end end end