summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-04-01 11:29:38 -0700
committerTim Smith <tsmith84@gmail.com>2021-04-01 11:29:38 -0700
commitaf0f5e3b2d527de1abd3d6db69a12678ad338f98 (patch)
tree1173f25e4a7c8e876e1b8faace7895d2dfd13aa0 /spec
parent5c7afb6fc445241c3dcd5767a90215b6a74deda9 (diff)
downloadchef-af0f5e3b2d527de1abd3d6db69a12678ad338f98.tar.gz
Resolve our chefstyle warningsredundant_begins
Now that knife has been moved we can resolve the current warnings Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/support/matchers/leak.rb16
-rw-r--r--spec/unit/knife/core/gem_glob_loader_spec.rb2
2 files changed, 8 insertions, 10 deletions
diff --git a/spec/support/matchers/leak.rb b/spec/support/matchers/leak.rb
index bd59a2755c..89d238c88e 100644
--- a/spec/support/matchers/leak.rb
+++ b/spec/support/matchers/leak.rb
@@ -59,15 +59,13 @@ module Matchers
end
def profiler
- @profiler ||= begin
- if ChefUtils.windows?
- require File.join(__dir__, "..", "platforms", "prof", "win32")
- RSpec::Prof::Win32::Profiler.new
- else
- require File.join(__dir__, "..", "prof", "gc")
- RSpec::Prof::GC::Profiler.new
- end
- end
+ @profiler ||= if ChefUtils.windows?
+ require File.join(__dir__, "..", "platforms", "prof", "win32")
+ RSpec::Prof::Win32::Profiler.new
+ else
+ require File.join(__dir__, "..", "prof", "gc")
+ RSpec::Prof::GC::Profiler.new
+ end
end
end
diff --git a/spec/unit/knife/core/gem_glob_loader_spec.rb b/spec/unit/knife/core/gem_glob_loader_spec.rb
index a6a94cc57a..072dac3986 100644
--- a/spec/unit/knife/core/gem_glob_loader_spec.rb
+++ b/spec/unit/knife/core/gem_glob_loader_spec.rb
@@ -71,7 +71,7 @@ describe Chef::Knife::SubcommandLoader::GemGlobLoader do
]
expected_files = [
"/usr/lib/ruby/gems/knife-ec2-0.5.12/lib/chef/knife/ec2_base.rb",
- "/usr/lib/ruby/gems/knife-ec2-0.5.12/lib/chef/knife/ec2_otherstuff.rb"
+ "/usr/lib/ruby/gems/knife-ec2-0.5.12/lib/chef/knife/ec2_otherstuff.rb",
]
expect($LOAD_PATH).to receive(:map).and_return([])