From f57968e329ce039395a6b7dc1886eb097c99b867 Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 24 May 2021 12:13:46 +0900 Subject: [PATCH] Set USE_COLORIZE to the default value in a test --- test/irb/test_init.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb index 203108ef72..e5417b18c3 100644 --- a/test/irb/test_init.rb +++ b/test/irb/test_init.rb @@ -68,7 +68,9 @@ module TestIRB end def test_no_color_environment_variable - orig = ENV['NO_COLOR'] + orig_no_color = ENV['NO_COLOR'] + orig_use_colorize = IRB.conf[:USE_COLORIZE] + IRB.conf[:USE_COLORIZE] = true assert IRB.conf[:USE_COLORIZE] @@ -80,7 +82,8 @@ module TestIRB IRB.setup(__FILE__) assert IRB.conf[:USE_COLORIZE] ensure - ENV['NO_COLOR'] = orig + ENV['NO_COLOR'] = orig_no_color + IRB.conf[:USE_COLORIZE] = orig_use_colorize end private