We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73ce1df commit 10e6926Copy full SHA for 10e6926
test/support/test_case.rb
@@ -13,20 +13,17 @@ class TestCase < Test::Unit::TestCase
13
include TestUtils
14
include DAP_TestUtils
15
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
22
23
def setup
24
@temp_file = nil
+ @original_root = Dir.home("root")
+ dir = Dir.mktmpdir
+ Dir.chroot(dir)
25
end
26
27
def teardown
28
remove_temp_file
29
- File.rename(TEMP_RC_FILENAME, RC_FILENAME) if File.exist?(TEMP_RC_FILENAME)
+ Dir.chroot(@original_root)
30
31
32
def remove_temp_file
0 commit comments