Skip to content

Commit

Permalink
Merge pull request #1194 from collectiveidea/fix-rspec-deprecation
Browse files Browse the repository at this point in the history
Use a block for expect to raise_exception
  • Loading branch information
albus522 authored Oct 2, 2023
2 parents 6a1c712 + 7e972d7 commit b66bb64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
expect(Delayed::Job).to receive(:reserve).exactly(10).times.and_raise(Exception)
worker = Delayed::Worker.new
9.times { worker.work_off }
expect(lambda { worker.work_off }).to raise_exception Delayed::FatalBackendError
expect { worker.work_off }.to raise_exception Delayed::FatalBackendError
end

it 'allows the backend to attempt recovery from reservation errors' do
Expand Down

0 comments on commit b66bb64

Please sign in to comment.