diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-02 19:46:54 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-03 02:16:50 -0700 |
commit | d964d8966c316fb224e37c3a98345622f3bd0cd7 (patch) | |
tree | 5de417eaa56b7483576bb372156eff89a6824a7d /test/test_helper.rb | |
parent | 0dfffd4d8e5fcdefa74653f7c93a0ff302467126 (diff) | |
download | unicorn-d964d8966c316fb224e37c3a98345622f3bd0cd7.tar.gz |
In case redirect_io is called multiple times, we don't want to lose debugging output.
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 37625ec..55aa70c 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -35,8 +35,9 @@ end def redirect_test_io orig_err = STDERR.dup orig_out = STDOUT.dup - STDERR.reopen("test_stderr.#{$$}.log") - STDOUT.reopen("test_stdout.#{$$}.log") + STDERR.reopen("test_stderr.#{$$}.log", "a") + STDOUT.reopen("test_stdout.#{$$}.log", "a") + STDERR.sync = STDOUT.sync = true at_exit do File.unlink("test_stderr.#{$$}.log") rescue nil |