diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-08-09 18:32:54 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-08-09 18:32:54 -0700 |
commit | ff2252ab223e0814c3868185380b62128be50ccf (patch) | |
tree | 0d1f959c3a7e5069667eeade940fcf7d36c34380 /test/unit/test_util.rb | |
parent | b20dca2f1ab4b419bf496fb3212ce424b529ac2b (diff) | |
download | unicorn-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/unit/test_util.rb')
-rw-r--r-- | test/unit/test_util.rb | 5 |
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 |