Skip to content
Browse files

Remove broken spec that should not have been committed

  • Loading branch information...
1 parent 1fea4b0 commit 92d7e31bc452e41076a07967627912c4872426b0 @betamatt betamatt committed
Showing with 0 additions and 51 deletions.
  1. +0 −51 spec/worker_spec.rb
View
51 spec/worker_spec.rb
@@ -34,55 +34,4 @@
lambda { Delayed::Worker.guess_backend }.should_not change { Delayed::Worker.backend }
end
end
-
- describe "running a job" do
- before(:each) do
- @worker = Delayed::Worker.new
- end
-
- after(:each) do
- Delayed::Job.delete_all
- end
-
- describe 'that fails' do
- before(:each) do
- @handler = ErrorJob.new
- @job = Delayed::Job.enqueue(@handler)
- end
-
- it 'should increase the attempts' do
- @worker.run(@job)
- @job.attempts.should == 1
- end
-
- it 'should reschedule the job in the future' do
- @worker.run(@job)
- @job.run_at.should > Job.db_time_now + 5
- end
-
- describe 'with custom rescheduling strategy' do
- before(:each) do
- @reschedule_at = Time.current + 7.hours
- @handler.stub!(:reschedule_at).and_return(@reschedule_at)
- end
-
- it 'should invoke the strategy' do
- @handler.should_receive(:reschedule_at) do |time, attempts|
- (Job.db_time_now - time).should < 2
- attempts.should == 1
-
- Job.db_time.now + 5
- end
-
- @worker.run(@job)
- end
-
- end
-
- it 'should reschedule at the specified time' do
- @worker.run(@job)
- @job.run_at.should == @reschedule_at
- end
- end
- end
end

0 comments on commit 92d7e31

Please sign in to comment.
Something went wrong with that request. Please try again.