Skip to content

Commit

Permalink
fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Nov 12, 2010
1 parent 1febad8 commit 488aaae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/delayed/backend/shared_spec.rb
Expand Up @@ -19,7 +19,8 @@ def create_job(opts = {})

it "should not set run_at automatically if already set" do
later = described_class.db_time_now + 5.minutes
described_class.create(:payload_object => ErrorJob.new, :run_at => later).run_at.should be_close(later, 1)
job = described_class.create(:payload_object => ErrorJob.new, :run_at => later)
job.run_at.should be_within(1).of(later)
end

describe "enqueue" do
Expand All @@ -41,7 +42,7 @@ def create_job(opts = {})
it "should be able to set run_at" do
later = described_class.db_time_now + 5.minutes
job = described_class.enqueue :payload_object => SimpleJob.new, :run_at => later
job.run_at.should be_close(later, 1)
job.run_at.should be_within(1).of(later)
end
end

Expand All @@ -68,7 +69,7 @@ def create_job(opts = {})
it "should be able to set run_at" do
later = described_class.db_time_now + 5.minutes
@job = described_class.enqueue SimpleJob.new, 5, later
@job.run_at.should be_close(later, 1)
@job.run_at.should be_within(1).of(later)
end

it "should work with jobs in modules" do
Expand Down

0 comments on commit 488aaae

Please sign in to comment.