summaryrefslogtreecommitdiff
path: root/spec/unit/knife/cookbook_delete_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-11-21 21:21:10 -0800
committerTim Smith <tsmith84@gmail.com>2020-11-21 21:21:10 -0800
commit1002fd4449e7d8e95aa09586d31220d6897d7a2c (patch)
tree4da5f6c58417e70e08438290555d71298d2e3b8b /spec/unit/knife/cookbook_delete_spec.rb
parent2478b8252d3c701da2e0fd4835028da53c59c498 (diff)
downloadchef-ambiguous_regex.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/unit/knife/cookbook_delete_spec.rb')
-rw-r--r--spec/unit/knife/cookbook_delete_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/knife/cookbook_delete_spec.rb b/spec/unit/knife/cookbook_delete_spec.rb
index 4de907e94d..f2aa7e1be0 100644
--- a/spec/unit/knife/cookbook_delete_spec.rb
+++ b/spec/unit/knife/cookbook_delete_spec.rb
@@ -152,7 +152,7 @@ describe Chef::Knife::CookbookDelete do
it "should print an error" do
@knife.available_versions
- expect(@stderr.string).to match /error.+cannot find a cookbook named foobar/i
+ expect(@stderr.string).to match(/error.+cannot find a cookbook named foobar/i)
end
it "should return nil" do
@@ -204,7 +204,7 @@ describe Chef::Knife::CookbookDelete do
it "should output that the cookbook was deleted" do
allow(@knife).to receive(:delete_request)
@knife.delete_version_without_confirmation("1.0.0")
- expect(@stderr.string).to match /deleted cookbook\[foobar\]\[1.0.0\]/im
+ expect(@stderr.string).to match(/deleted cookbook\[foobar\]\[1.0.0\]/im)
end
describe "with --print-after" do