diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-12-31 23:37:21 -0500 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-12-31 23:37:21 -0500 |
commit | 8856702f3f83570ac466dc016b3aba005f8b3949 (patch) | |
tree | f4309fbdfbef78e740aa7127634092f0ddfeb7fd /spec | |
parent | bb6116d12fbc75dbb3d1daa36b8413b1bc6638d1 (diff) | |
download | chef-8856702f3f83570ac466dc016b3aba005f8b3949.tar.gz |
Resolve Style/SelectByRegexp warningsStyle_SelectByRegexp
Simplify how we collect or reject data based on regex matches
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 60b608e4ff..5cd04437be 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -78,9 +78,9 @@ require "spec/support/recipe_dsl_helper" # Excludes support/platforms by default # Do not change the gsub. Dir["spec/support/**/*.rb"] - .reject { |f| f =~ %r{^spec/support/platforms} } - .reject { |f| f =~ %r{^spec/support/pedant} } - .reject { |f| f =~ %r{^spec/support/shared/integration/knife_support} } + .grep_v(%r{^spec/support/platforms}) + .grep_v(%r{^spec/support/pedant}) + .grep_v(%r{^spec/support/shared/integration/knife_support}) .map { |f| f.gsub(/.rb$/, "") } .map { |f| f.gsub(%r{spec/}, "") } .each { |f| require f } |