summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-11-27 13:52:34 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-12-21 18:02:09 +0100
commit064d443c5604415059ac96b53cd3c23e31ca48e8 (patch)
tree74a5ff0981f5f8896cfa6cd4bd4b6d3d4605184e
parent9eefcbece2378b2c355e58f2a5a208d4ab0e8315 (diff)
downloadbundler-064d443c5604415059ac96b53cd3c23e31ca48e8.tar.gz
Use a regexp instead of a convoluted start_with? method call
-rw-r--r--spec/support/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 3ec5d368b9..c055fad7b2 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -84,7 +84,7 @@ module Spec
with_sudo = options.delete(:sudo)
sudo = with_sudo == :preserve_env ? "sudo -E" : "sudo" if with_sudo
- options["no-color"] = true unless options.key?("no-color") || cmd.to_s.start_with?("exec", "exe", "ex", "e", "conf")
+ options["no-color"] = true unless options.key?("no-color") || cmd.to_s =~ /\A(e|ex|exe|exec|conf|confi|config)(\s|\z)/
bundle_bin = options.delete("bundle_bin") || File.expand_path("../../../exe/bundle", __FILE__)