about summary refs log tree commit homepage
path: root/test/exec/test_exec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/exec/test_exec.rb')
-rw-r--r--test/exec/test_exec.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb
index 8974faf..9f65ce3 100644
--- a/test/exec/test_exec.rb
+++ b/test/exec/test_exec.rb
@@ -9,16 +9,9 @@ do_test = true
 
 $unicorn_bin = ENV['UNICORN_TEST_BIN'] || "unicorn"
 redirect_test_io do
-  pid = fork do
-    exec($unicorn_bin, '-v')
-    exit(1)
-  end
-  Process.waitpid(pid)
-end
-unless $?.success?
-  STDERR.puts "#{$unicorn_bin} not found in PATH=#{ENV['PATH']}, "\
-              "skipping this test"
-  do_test = false
+  do_test = system($unicorn_bin, '-v') or \
+    STDERR.puts "#{$unicorn_bin} not found in PATH=#{ENV['PATH']}, "\
+                "skipping this test"
 end
 
 begin