diff options
-rw-r--r-- | test/exec/test_exec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 4e460e2..7a4e59b 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -8,8 +8,13 @@ require 'fileutils' do_test = true $unicorn_bin = ENV['UNICORN_TEST_BIN'] || "unicorn" -pid = fork { redirect_test_io { exec($unicorn_bin, '-v'); exit!(1) } } -Process.waitpid(pid) +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" |