Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing expectation in spec.

  • Loading branch information...
commit 55a89af1ac35bd6431de826d5b9d60553a5a47dd 1 parent 5e8745c
@rares rares authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  spec/job_spec.rb
View
2  spec/job_spec.rb
@@ -192,7 +192,7 @@ def perform; raise 'did not work'; end
it "should leave the queue in a consistent state if failure occurs trying to aquire a lock" do
SimpleJob.runs.should == 0
@job.stub!(:lock_exclusively!).with(:any_args).once.and_raise(Delayed::Job::LockError)
- Delayed::Job.should_receive(:find_available).any_number_of_times.at_least(:once).and_return([@job])
+ Delayed::Job.should_receive(:find_available).at_least(:once).and_return([@job])
Delayed::Job.work_off(1)
SimpleJob.runs.should == 0
Delayed::Job.find_available(5).length.should == 1
Please sign in to comment.
Something went wrong with that request. Please try again.