From 8a5891b2c144a8eb8460fed74cfd4f2e9291b337 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 3 May 2018 15:11:28 -0700 Subject: Fix two new Chefstyle warnings with Rubocop 0.55 These should have been caught before. Signed-off-by: Tim Smith --- spec/functional/resource/group_spec.rb | 2 +- spec/unit/provider/powershell_script_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb index 03c14382e9..ea9aa5c2b7 100644 --- a/spec/functional/resource/group_spec.rb +++ b/spec/functional/resource/group_spec.rb @@ -81,7 +81,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows, :not_supporte if user && domain != "." computer_name = ENV["computername"] - !domain.casecmp(computer_name.downcase).zero? + !domain.casecmp(computer_name.downcase) == 0 end end diff --git a/spec/unit/provider/powershell_script_spec.rb b/spec/unit/provider/powershell_script_spec.rb index d7a1620530..f4663861c6 100644 --- a/spec/unit/provider/powershell_script_spec.rb +++ b/spec/unit/provider/powershell_script_spec.rb @@ -84,7 +84,7 @@ describe Chef::Provider::PowershellScript, "action_run" do provider_flags.find do |value| execution_policy_index += 1 - execution_policy_specified = value.casecmp("-ExecutionPolicy".downcase).zero? + execution_policy_specified = value.casecmp("-ExecutionPolicy".downcase) == 0 end execution_policy = execution_policy_specified ? provider_flags[execution_policy_index] : nil -- cgit v1.2.1