about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-08-09 18:32:54 -0700
committerEric Wong <normalperson@yhbt.net>2009-08-09 18:32:54 -0700
commitff2252ab223e0814c3868185380b62128be50ccf (patch)
tree0d1f959c3a7e5069667eeade940fcf7d36c34380 /test
parentb20dca2f1ab4b419bf496fb3212ce424b529ac2b (diff)
downloadunicorn-ff2252ab223e0814c3868185380b62128be50ccf.tar.gz
Otherwise they might be picked up by the GC during the
other tests (exposed by Ruby 1.9.1-p243).
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_util.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/test_util.rb b/test/unit/test_util.rb
index 032f0be..99c1cef 100644
--- a/test/unit/test_util.rb
+++ b/test/unit/test_util.rb
@@ -15,6 +15,7 @@ class TestUtil < Test::Unit::TestCase
     assert_equal before, File.stat(tmp.path).inspect
     assert_equal ext, (tmp.external_encoding rescue nil)
     assert_equal int, (tmp.internal_encoding rescue nil)
+    assert_nothing_raised { tmp.close! }
   end
 
   def test_reopen_logs_renamed
@@ -37,6 +38,8 @@ class TestUtil < Test::Unit::TestCase
     assert_equal int, (tmp.internal_encoding rescue nil)
     assert_equal(EXPECT_FLAGS, EXPECT_FLAGS & tmp.fcntl(Fcntl::F_GETFL))
     assert tmp.sync
+    assert_nothing_raised { tmp.close! }
+    assert_nothing_raised { to.close! }
   end
 
   def test_reopen_logs_renamed_with_encoding
@@ -59,6 +62,7 @@ class TestUtil < Test::Unit::TestCase
         assert fp.sync
       }
     }
+    assert_nothing_raised { tmp.close! }
   end if STDIN.respond_to?(:external_encoding)
 
   def test_reopen_logs_renamed_with_internal_encoding
@@ -84,6 +88,7 @@ class TestUtil < Test::Unit::TestCase
         }
       }
     }
+    assert_nothing_raised { tmp.close! }
   end if STDIN.respond_to?(:external_encoding)
 
 end