Skip to content

Commit 315ecaf

Browse files
hsbtko1
authored andcommitted
Remove and Restore irb configuration like irbrc while irb console tests
1 parent e4e6545 commit 315ecaf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/console/irb_test.rb

+9
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@ module DEBUGGER__
66
class IrbTest < ConsoleTestCase
77
def setup
88
@original_pager = ENV["PAGER"]
9+
@original_home = ENV["HOME"]
10+
@original_xdg_config_home = ENV["XDG_CONFIG_HOME"]
11+
@original_irbrc = ENV["IRBRC"]
12+
913
ENV["PAGER"] = "cat"
14+
ENV["HOME"] = ENV["XDG_CONFIG_HOME"] = Dir.mktmpdir
15+
ENV["IRBRC"] = nil
1016
end
1117

1218
def teardown
1319
ENV["PAGER"] = @original_pager
20+
ENV["HOME"] = @original_home
21+
ENV["XDG_CONFIG_HOME"] = @original_xdg_config_home
22+
ENV["IRBRC"] = @original_irbrc
1423
end
1524

1625
def program

0 commit comments

Comments
 (0)