Commit f04346d50813763de2d71b1e0fcd5d707e949bd2

Authored by Stephen Crosby
1 parent ef370276
Exists in master and in 1 other branch production

remove deprecated stub syntax

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
spec/models/notice_observer_spec.rb
@@ -14,7 +14,7 @@ describe "Callback on Notice", type: 'model' do @@ -14,7 +14,7 @@ describe "Callback on Notice", type: 'model' do
14 14
15 custom_thresholds.each do |threshold| 15 custom_thresholds.each do |threshold|
16 it "sends an email notification after #{threshold} notice(s)" do 16 it "sends an email notification after #{threshold} notice(s)" do
17 - @err.problem.stub(:notices_count).and_return(threshold) 17 + allow(@err.problem).to receive(:notices_count).and_return(threshold)
18 expect(Mailer).to receive(:err_notification). 18 expect(Mailer).to receive(:err_notification).
19 and_return(double('email', :deliver => true)) 19 and_return(double('email', :deliver => true))
20 Fabricate(:notice, :err => @err) 20 Fabricate(:notice, :err => @err)