aboutsummaryrefslogtreecommitdiffstats
path: root/spec/syntax_suggest/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/syntax_suggest/spec_helper.rb')
-rw-r--r--spec/syntax_suggest/spec_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/syntax_suggest/spec_helper.rb b/spec/syntax_suggest/spec_helper.rb
index 67d401888b..8691246f38 100644
--- a/spec/syntax_suggest/spec_helper.rb
+++ b/spec/syntax_suggest/spec_helper.rb
@@ -16,6 +16,12 @@ RSpec.configure do |config|
config.expect_with :rspec do |c|
c.syntax = :expect
end
+
+ if config.color_mode == :automatic
+ if color_enabled? and (ENV["TERM"] == "dumb" or ENV["NO_COLOR"]&.slice(0))
+ config.color_mode = :off
+ end
+ end
end
# Used for debugging modifications to