From ed52bfd44b548de6fa4d5ba021d1eca2be45531f Mon Sep 17 00:00:00 2001 From: David Elner Date: Thu, 11 Jul 2024 15:04:50 -0400 Subject: [PATCH] Fixed: RSpec #log_deprecation matcher error when log is limited. --- spec/support/core_helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/core_helpers.rb b/spec/support/core_helpers.rb index b4a7d73f13b..9764d74d28d 100644 --- a/spec/support/core_helpers.rb +++ b/spec/support/core_helpers.rb @@ -15,7 +15,7 @@ module CoreHelpers # expect { subject }.to_not log_deprecation(include('no_longer_deprecated_option')) RSpec::Matchers.define :log_deprecation do |message_matcher| match(notify_expectation_failures: true) do |block| - expect(::Datadog::Core).to receive(:log_deprecation).with(no_args) do |&message_block| + expect(::Datadog::Core).to receive(:log_deprecation).with(any_args) do |&message_block| expect(message_block.call).to match(message_matcher) if message_matcher end @@ -26,7 +26,7 @@ module CoreHelpers match_when_negated(notify_expectation_failures: true) do |block| if message_matcher - allow(::Datadog::Core).to receive(:log_deprecation).with(no_args) do |&message_block| + allow(::Datadog::Core).to receive(:log_deprecation).with(any_args) do |&message_block| expect(message_block.call).to_not match(message_matcher) end else