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
This commit is contained in:
Luis Castro 2019-07-14 10:06:03 +02:00
parent fb638f0c26
commit d4f6e2d91d
No known key found for this signature in database
GPG key ID: 0A8F33D4C4E27639

View file

@ -19,7 +19,7 @@ RSpec.shared_context :shared_rd_donation_value_context do
let(:default_edit_token) {'7903e34c-10fe-11e8-9ead-d302c690bee4'} let(:default_edit_token) {'7903e34c-10fe-11e8-9ead-d302c690bee4'}
before(:each){ 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) def nil_or_true(item)
item.nil? || item item.nil? || item
end end
end end