summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-05-24 12:13:46 +0900
committeraycabta <aycabta@gmail.com>2021-05-24 12:13:46 +0900
commitf57968e329ce039395a6b7dc1886eb097c99b867 (patch)
treeab396fee116dd54eb6abaf1d91be1c0f7e2426e6 /test/irb
parentd06d4560a1196c72831fe59faa698d6672883448 (diff)
Set USE_COLORIZE to the default value in a test
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_init.rb7
1 files 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