From af0f5e3b2d527de1abd3d6db69a12678ad338f98 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 1 Apr 2021 11:29:38 -0700 Subject: Resolve our chefstyle warnings Now that knife has been moved we can resolve the current warnings Signed-off-by: Tim Smith --- spec/support/matchers/leak.rb | 16 +++++++--------- spec/unit/knife/core/gem_glob_loader_spec.rb | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'spec') 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([]) -- cgit v1.2.1