Skip to content

Commit

Permalink
Fixed spec according to newest Resque api.
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Mar 21, 2011
1 parent 32460fe commit 9f01c14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/loner_spec.rb
Expand Up @@ -99,15 +99,15 @@ def self.perform(foo); end
end

it "should mark jobs as unqueued, when they raise an exception during #perform" do
Resque.enqueue( FailingUniqueJob, "foo" ).should == "OK"
Resque.enqueue( FailingUniqueJob, "foo" ).should == 1
Resque.enqueue( FailingUniqueJob, "foo" ).should == "EXISTED"
Resque.size(:other_queue).should == 1

worker = Resque::Worker.new(:other_queue)
worker.work 0
Resque.size(:other_queue).should == 0

Resque.enqueue( FailingUniqueJob, "foo" ).should == "OK" # Means that the job was not queued
Resque.enqueue( FailingUniqueJob, "foo" ).should == 1 # Means that the job was not queued
Resque.enqueue( FailingUniqueJob, "foo" ).should == "EXISTED"
Resque.size(:other_queue).should == 1
end
Expand All @@ -134,7 +134,7 @@ def self.perform(foo); end

Resque.remove_queue(:other_queue)

Resque.enqueue(SomeUniqueJob, "foo").should == "OK"
Resque.enqueue(SomeUniqueJob, "foo").should == 1
end

end
Expand Down

0 comments on commit 9f01c14

Please sign in to comment.