Skip to content
Browse files

Make spec pass when run on machines with the TZ set to UTC

  • Loading branch information...
1 parent 7369923 commit a00f01e282d0cfffbacb2335d01d6665c97d68d4 @bkeepers bkeepers committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 spec/job_spec.rb
View
8 spec/job_spec.rb
@@ -12,6 +12,10 @@
SimpleJob.runs = 0
end
+ after do
+ Time.zone = nil
+ end
+
it_should_behave_like 'a backend'
context "db_time_now" do
@@ -27,9 +31,9 @@
end
it "should return local time if that is the AR default" do
- Time.zone = nil
+ Time.zone = 'Central Time (US & Canada)'
ActiveRecord::Base.default_timezone = :local
- Delayed::Job.db_time_now.zone.should_not == 'UTC'
+ Delayed::Job.db_time_now.zone.should == 'CST'
end
end

0 comments on commit a00f01e

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