diff options
author | Tim Smith <tsmith@chef.io> | 2020-06-14 15:29:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-14 15:29:31 -0700 |
commit | 2892a24aa5d4c5af6db820c2d92fc1e1a9f33ce8 (patch) | |
tree | 46f150536ce9e33f2b9618f4cfc6aee59b83d005 /spec/unit | |
parent | ab55465c32d47a3dba497fdada7a93a705221ecd (diff) | |
parent | 7633417e686f83728b5ae6e9c66df19f38d34492 (diff) | |
download | chef-2892a24aa5d4c5af6db820c2d92fc1e1a9f33ce8.tar.gz |
Merge pull request #9989 from chef/match
Use .match? not =~ when match values aren't necessary
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/util/dsc/configuration_generator_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/util/dsc/configuration_generator_spec.rb b/spec/unit/util/dsc/configuration_generator_spec.rb index dcf460ab4e..eee6adbd07 100644 --- a/spec/unit/util/dsc/configuration_generator_spec.rb +++ b/spec/unit/util/dsc/configuration_generator_spec.rb @@ -161,7 +161,7 @@ describe Chef::Util::DSC::ConfigurationGenerator do dsc = conf_man.send(:configuration_code, "archive{}", "hello", {}) found_configuration = false dsc.split(";").each do |command| - if command.downcase =~ /\s*configuration\s+'hello'\s*\{\s*node\s+'localhost'\s*\{\s*archive\s*\{\s*\}\s*\}\s*\}\s*/ + if /\s*configuration\s+'hello'\s*\{\s*node\s+'localhost'\s*\{\s*archive\s*\{\s*\}\s*\}\s*\}\s*/.match?(command.downcase) found_configuration = true end end |