Skip to content

Commit 10e6926

Browse files
committed
WIP
1 parent 73ce1df commit 10e6926

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/support/test_case.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,17 @@ class TestCase < Test::Unit::TestCase
1313
include TestUtils
1414
include DAP_TestUtils
1515
include AssertionHelpers
16-
RC_FILENAME = File.join(Dir.home, ".rdbgrc")
17-
TEMP_RC_FILENAME = File.join(Dir.home, ".rdbgrc.original")
18-
19-
def setup
20-
File.rename(RC_FILENAME, TEMP_RC_FILENAME) if File.exist?(RC_FILENAME)
21-
end
2216

2317
def setup
2418
@temp_file = nil
19+
@original_root = Dir.home("root")
20+
dir = Dir.mktmpdir
21+
Dir.chroot(dir)
2522
end
2623

2724
def teardown
2825
remove_temp_file
29-
File.rename(TEMP_RC_FILENAME, RC_FILENAME) if File.exist?(TEMP_RC_FILENAME)
26+
Dir.chroot(@original_root)
3027
end
3128

3229
def remove_temp_file

0 commit comments

Comments
 (0)