summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-05 11:44:16 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-05 12:41:14 -0700
commit7bf98ad06b30b7feb4ea3fbbe45a5b733467a5d3 (patch)
treeb0995ded1a63654d3f54140bd880c69f86afd52f /spec/spec_helper.rb
parent9802d7c075c8b7dae42dbcecd92d492f7fa128ac (diff)
downloadchef-7bf98ad06b30b7feb4ea3fbbe45a5b733467a5d3.tar.gz
Style/RegexpLiteral
given how many regexps we have with /'s in the match this seems like a very good one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ee486e919c..875287a0a4 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -52,7 +52,7 @@ require "chef/knife"
Dir["lib/chef/knife/**/*.rb"]
.map { |f| f.gsub("lib/", "") }
- .map { |f| f.gsub(%r{\.rb$}, "") }
+ .map { |f| f.gsub(/\.rb$/, "") }
.each { |f| require f }
require "chef/resource_resolver"
@@ -93,7 +93,7 @@ require "spec/support/shared/unit/mock_shellout"
Dir["spec/support/**/*.rb"]
.reject { |f| f =~ %r{^spec/support/platforms} }
.reject { |f| f =~ %r{^spec/support/pedant} }
- .map { |f| f.gsub(%r{.rb$}, "") }
+ .map { |f| f.gsub(/.rb$/, "") }
.map { |f| f.gsub(%r{spec/}, "") }
.each { |f| require f }