summaryrefslogtreecommitdiff
path: root/spec/unit/shell_spec.rb
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/unit/shell_spec.rb
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/unit/shell_spec.rb')
-rw-r--r--spec/unit/shell_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/shell_spec.rb b/spec/unit/shell_spec.rb
index 18b622698e..9c1a0c8e3d 100644
--- a/spec/unit/shell_spec.rb
+++ b/spec/unit/shell_spec.rb
@@ -150,8 +150,8 @@ describe Shell do
end
it "creates a help banner with the command descriptions" do
- expect(@chef_object.help_banner).to match(/^\|\ Command[\s]+\|\ Description[\s]*$/)
- expect(@chef_object.help_banner).to match(/^\|\ rspec_method[\s]+\|\ rspecin\'[\s]*$/)
+ expect(@chef_object.help_banner).to match(/^\|\ Command\s+\|\ Description\s*$/)
+ expect(@chef_object.help_banner).to match(/^\|\ rspec_method\s+\|\ rspecin\'\s*$/)
end
end