From 69b9699fca9b24026c88267afec87be2a86fcb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Thu, 26 Apr 2012 10:50:19 +0300 Subject: Adjust times for spec to avoid running into DST issues. --- spec/models/refinery/blog/post_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/models') diff --git a/spec/models/refinery/blog/post_spec.rb b/spec/models/refinery/blog/post_spec.rb index 0c2ce81..5599b4d 100644 --- a/spec/models/refinery/blog/post_spec.rb +++ b/spec/models/refinery/blog/post_spec.rb @@ -72,15 +72,15 @@ module Refinery describe ".published_dates_older_than" do before do - @post1 = FactoryGirl.create(:blog_post, :published_at => Time.now - 2.months) - @post2 = FactoryGirl.create(:blog_post, :published_at => Time.now - 1.month) + @post1 = FactoryGirl.create(:blog_post, :published_at => Time.now - 20.minutes) + @post2 = FactoryGirl.create(:blog_post, :published_at => Time.now - 15.minutes) FactoryGirl.create(:blog_post, :published_at => Time.now) end it "returns all published dates older than the argument" do expected = [@post2.published_at, @post1.published_at] - described_class.published_dates_older_than(1.day.ago).should eq(expected) + described_class.published_dates_older_than(5.minutes.ago).should eq(expected) end end -- cgit v1.2.3