diff --git a/spec/integration/ruby_command_line_spec.rb b/spec/integration/ruby_command_line_spec.rb index e7523ee..b41a4c8 100644 --- a/spec/integration/ruby_command_line_spec.rb +++ b/spec/integration/ruby_command_line_spec.rb @@ -58,7 +58,7 @@ module SyntaxSuggest EOM script.write(contents) - out = `#{ruby} -I#{lib_dir} -rsyntax_suggest #{script} 2>&1` + out = `#{ruby} -I#{lib_dir} -rsyntax_suggest/version #{script} 2>&1` expect(out).to include("suggest_version is #{SyntaxSuggest::VERSION}").once end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 67d4018..89bc9f4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,6 +16,12 @@ config.expect_with :rspec do |c| c.syntax = :expect end + + if config.color_mode == :automatic + if config.color_enabled? && ((ENV["TERM"] == "dumb") || ENV["NO_COLOR"]&.slice(0)) + config.color_mode = :off + end + end end # Used for debugging modifications to