summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-26 11:51:28 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-26 11:51:28 -0700
commit8837ebfda2a4292976d44ec564f349f357349fc1 (patch)
tree765d2e98a4c0bead2030f411f07613207e5070b5 /spec/functional
parent4d13c5acaa8596eab50b7d62252a6d94ab290d61 (diff)
downloadchef-simplify_regex.tar.gz
Simplify some regexes by removing redundant character classessimplify_regex
New RuboCop here. There's no need for character classes when all we have is a single character. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/resource/apt_package_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/functional/resource/apt_package_spec.rb b/spec/functional/resource/apt_package_spec.rb
index 228882a2e7..6a1031feb8 100644
--- a/spec/functional/resource/apt_package_spec.rb
+++ b/spec/functional/resource/apt_package_spec.rb
@@ -326,7 +326,7 @@ describe Chef::Resource::AptPackage, metadata do
pkg_check = shell_out!("dpkg -l chef-integration-test", returns: [0, 1])
if pkg_check.exitstatus == 0
- expect(pkg_check.stdout).to match(/un[\s]+chef-integration-test/)
+ expect(pkg_check.stdout).to match(/un\s+chef-integration-test/)
end
end
@@ -359,7 +359,7 @@ describe Chef::Resource::AptPackage, metadata do
it "upgrades the package for action :upgrade" do
package_resource.run_action(:upgrade)
dpkg_l = shell_out!("dpkg -l chef-integration-test", returns: [0])
- expect(dpkg_l.stdout).to match(/chef\-integration\-test[\s]+1\.1\-1/)
+ expect(dpkg_l.stdout).to match(/chef\-integration\-test\s+1\.1\-1/)
expect(package_resource).to be_updated_by_last_action
end
@@ -373,7 +373,7 @@ describe Chef::Resource::AptPackage, metadata do
it "upgrades the package for action :install" do
package_resource.run_action(:install)
dpkg_l = shell_out!("dpkg -l chef-integration-test", returns: [0])
- expect(dpkg_l.stdout).to match(/chef\-integration\-test[\s]+1\.1\-1/)
+ expect(dpkg_l.stdout).to match(/chef\-integration\-test\s+1\.1\-1/)
expect(package_resource).to be_updated_by_last_action
end
end