File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,29 +16,29 @@ def test_segv
1616
1717 def test_db_filename
1818 assert_equal '' , @db . filename ( 'main' )
19- tf = Tempfile . new
19+ tf = Tempfile . new 'thing'
2020 @db = SQLite3 ::Database . new tf . path
2121 assert_equal tf . path , @db . filename ( 'main' )
2222 ensure
23- tf . unlink
23+ tf . unlink if tf
2424 end
2525
2626 def test_filename
2727 assert_equal '' , @db . filename
28- tf = Tempfile . new
28+ tf = Tempfile . new 'thing'
2929 @db = SQLite3 ::Database . new tf . path
3030 assert_equal tf . path , @db . filename
3131 ensure
32- tf . unlink
32+ tf . unlink if tf
3333 end
3434
3535 def test_filename_with_attachment
3636 assert_equal '' , @db . filename
37- tf = Tempfile . new
37+ tf = Tempfile . new 'thing'
3838 @db . execute "ATTACH DATABASE '#{ tf . path } ' AS 'testing'"
3939 assert_equal tf . path , @db . filename ( 'testing' )
4040 ensure
41- tf . unlink
41+ tf . unlink if tf
4242 end
4343
4444 def test_bignum
You can’t perform that action at this time.
0 commit comments