Use #allow instead of #stub

This commit is contained in:
Matt-Yorkley
2020-05-06 13:46:05 +02:00
parent 7457543c2b
commit 460ab6cdb4

View File

@@ -5,7 +5,7 @@ describe CacheService do
describe "#cache" do
before do
rails_cache.stub(:fetch)
allow(rails_cache).to receive(:fetch)
end
it "provides a wrapper for basic #fetch calls to Rails.cache" do
@@ -21,7 +21,7 @@ describe CacheService do
let(:timestamp) { Time.now.to_i }
before do
rails_cache.stub(:fetch)
allow(rails_cache).to receive(:fetch)
allow(Enterprise).to receive(:maximum).with(:updated_at).and_return(timestamp)
end