diff options
-rw-r--r-- | spec/unit/client_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb index ba25285278..3ce9413488 100644 --- a/spec/unit/client_spec.rb +++ b/spec/unit/client_spec.rb @@ -321,6 +321,8 @@ describe Chef::Client do it "does not warn when running an non-EOL release" do stub_const("Chef::VERSION", 15) + # added a call to client because Time.now gets invoked multiple times during instantiation. Don't mock Time until after client initialized + client allow(Time).to receive(:now).and_return(Time.new(2021, 4, 31)) expect(logger).to_not receive(:warn).with(/became end of life/) client.warn_if_eol |