Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12e3d03

Browse files
authored
Store tempfile objects to prevent deletion during tests (#555)
1 parent735b083 commit12e3d03

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎tests/units/test_archive.rb‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ class TestArchive < Test::Unit::TestCase
77
defsetup
88
set_file_paths
99
@git=Git.open(@wdir)
10+
@tempfiles=[]
11+
end
12+
13+
defteardown
14+
@tempfiles.clear
1015
end
1116

1217
deftempfile
1318
tempfile_object=Tempfile.new('archive-test')
19+
@tempfiles <<tempfile_object# prevent deletion until teardown
1420
tempfile_object.close# close to avoid locking from git processes
1521
tempfile_object.path
1622
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp