From d4f6e2d91d4fc60a5bd6d326bdac095793fb832d Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Sun, 14 Jul 2019 10:06:03 +0200 Subject: [PATCH] test(donation_context): fix any_instance deprecation warning Changed from the old syntax to the new allow_any_instance_of according to the documentation. https://www.rubydoc.info/github/rspec/rspec-mocks/RSpec/Mocks/ExampleMethods%3aallow_any_instance_of --- spec/support/contexts/shared_rd_donation_value_context.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/contexts/shared_rd_donation_value_context.rb b/spec/support/contexts/shared_rd_donation_value_context.rb index 6a95a85c..8a30d2c5 100644 --- a/spec/support/contexts/shared_rd_donation_value_context.rb +++ b/spec/support/contexts/shared_rd_donation_value_context.rb @@ -19,7 +19,7 @@ RSpec.shared_context :shared_rd_donation_value_context do let(:default_edit_token) {'7903e34c-10fe-11e8-9ead-d302c690bee4'} before(:each){ - Event.any_instance.stub(:geocode).and_return([1,1]) + allow_any_instance_of(Event).to_receive(:geocode).and_return([1,1]) } @@ -495,4 +495,4 @@ RSpec.shared_context :shared_rd_donation_value_context do def nil_or_true(item) item.nil? || item end -end \ No newline at end of file +end