From 9a7e1f1a7e986a59eb4be9b6a4d093f3366c9c72 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 1 Mar 2009 00:03:29 -0800 Subject: test_exec: avoid hiding error when binary can't be found Oops, that was making debugging tests quite difficult. --- test/exec/test_exec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 5806210..583c81d 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -11,9 +11,12 @@ DEFAULT_RES = 0.2 $unicorn_bin = ENV['UNICORN_TEST_BIN'] || "unicorn" redirect_test_io do - do_test = system($unicorn_bin, '-v') or \ - STDERR.puts "#{$unicorn_bin} not found in PATH=#{ENV['PATH']}, "\ - "skipping this test" + do_test = system($unicorn_bin, '-v') +end + +unless do_test + STDERR.puts "#{$unicorn_bin} not found in PATH=#{ENV['PATH']}, " \ + "skipping this test" end begin -- cgit v1.2.3-24-ge0c7