spec/archiver_spec.rb in alephant-publisher-0.2.9 vs spec/archiver_spec.rb in alephant-publisher-0.3.0
- old
+ new
@@ -1,21 +1,21 @@
require 'spec_helper'
describe Alephant::Publisher::SQSHelper::Archiver do
describe "#see" do
it "calls cache put with the correct params" do
- time_now = Time.parse("Feb 24 1981")
- Time.stub!(:now).and_return(time_now)
+ time_now = DateTime.parse("Feb 24 1981")
+ DateTime.stub(:now).and_return(time_now)
q = double("queue").as_null_object
c = double("cache").as_null_object
expect(q).to receive(:url).and_return('url')
m = Struct.new(:id, :body, :md5, :queue).new('id', 'body', 'md5', q)
expect(c).to receive(:put).with(
- "archive/id",
+ "archive/#{time_now.strftime('%d-%m-%Y_%H')}/id",
"body",
{
:id => "id",
:md5 => "md5",
:logged_at => time_now.to_s,