diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-11-21 21:21:10 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-11-21 21:21:10 -0800 |
commit | 1002fd4449e7d8e95aa09586d31220d6897d7a2c (patch) | |
tree | 4da5f6c58417e70e08438290555d71298d2e3b8b /spec/functional | |
parent | 2478b8252d3c701da2e0fd4835028da53c59c498 (diff) | |
download | chef-1002fd4449e7d8e95aa09586d31220d6897d7a2c.tar.gz |
Avoid ambiguous regexesambiguous_regex
Just makes it a bit easier to read.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/functional')
-rw-r--r-- | spec/functional/mixin/powershell_out_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/functional/mixin/powershell_out_spec.rb b/spec/functional/mixin/powershell_out_spec.rb index 22df0f92c9..801910cd87 100644 --- a/spec/functional/mixin/powershell_out_spec.rb +++ b/spec/functional/mixin/powershell_out_spec.rb @@ -23,15 +23,15 @@ describe Chef::Mixin::PowershellOut, :windows_only do describe "#powershell_out" do it "runs a powershell command and collects stdout" do - expect(powershell_out("get-process").run_command.stdout).to match /Handles/ + expect(powershell_out("get-process").run_command.stdout).to match(/Handles/) end it "uses :powershell by default" do - expect(powershell_out("$PSVersionTable").run_command.stdout).to match /CLRVersion/ + expect(powershell_out("$PSVersionTable").run_command.stdout).to match(/CLRVersion/) end it ":pwsh interpreter uses core edition", :pwsh_installed do - expect(powershell_out("$PSVersionTable", :pwsh).run_command.stdout).to match /Core/ + expect(powershell_out("$PSVersionTable", :pwsh).run_command.stdout).to match(/Core/) end it "does not raise exceptions when the command is invalid" do @@ -41,7 +41,7 @@ describe Chef::Mixin::PowershellOut, :windows_only do describe "#powershell_out!" do it "runs a powershell command and collects stdout" do - expect(powershell_out!("get-process").run_command.stdout).to match /Handles/ + expect(powershell_out!("get-process").run_command.stdout).to match(/Handles/) end it "raises exceptions when the command is invalid" do |