diff --git a/spec/support/helper_methods.rb b/spec/support/helper_methods.rb index 4b6abe8705..97ee565190 100644 --- a/spec/support/helper_methods.rb +++ b/spec/support/helper_methods.rb @@ -23,4 +23,14 @@ def safely end end + def expect_deprecation_with_call_site(file, line) + expect(RSpec.configuration.reporter).to receive(:deprecation) do |options| + expect(options[:call_site]).to include([file, line].join(':')) + end + end + + def allow_deprecation + allow(RSpec.configuration.reporter).to receive(:deprecation) + end + end