Commit eabf9df1 authored by Uģis Ozols's avatar Uģis Ozols
Browse files

Use Time.utc because we can't use Time.new with arguments in Ruby 1.8.7.

parent c87c4782
......@@ -8,13 +8,13 @@ module Refinery
let(:news_item) { Factory(:news_item) }
describe "#archive" do
let(:publish_date) { Time.new(2012,1,15) }
let(:future_date) { Time.new(2012,2,15) }
let(:publish_date) { Time.utc(2012,1,15) }
let(:future_date) { Time.utc(2012,2,15) }
let(:archive_range) { Time.parse("01/12") }
it "should show 5 news items with publish dates in same month" do
5.times { Factory(:news_item, :publish_date => publish_date) }
5.times { Factory(:news_item, :publish_date => future_date) }
2.times { Factory(:news_item, :publish_date => future_date) }
Refinery::News::Item.by_archive(archive_range).count.should == 5
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment