aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2012-04-26 10:50:19 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2012-04-26 10:50:42 +0300
commit69b9699fca9b24026c88267afec87be2a86fcb46 (patch)
treef23d5bb88b5d84c0fb9f1713e28c80d635e234c7 /spec
parent7e1b4831f15ac3bd44044208a9425c4a5dd8111c (diff)
downloadrefinerycms-blog-69b9699fca9b24026c88267afec87be2a86fcb46.tar.gz
refinerycms-blog-69b9699fca9b24026c88267afec87be2a86fcb46.tar.bz2
refinerycms-blog-69b9699fca9b24026c88267afec87be2a86fcb46.zip
Adjust times for spec to avoid running into DST issues.
Diffstat (limited to 'spec')
-rw-r--r--spec/models/refinery/blog/post_spec.rb6
1 files changed, 3 insertions, 3 deletions
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