spec/archiver_spec.rb in alephant-publisher-queue-2.1.4 vs spec/archiver_spec.rb in alephant-publisher-queue-2.2.0
- old
+ new
@@ -1,32 +1,32 @@
require "spec_helper"
describe Alephant::Publisher::Queue::SQSHelper::Archiver do
- let (:cache) { instance_double("Alephant::Cache", :put => nil) }
- let (:queue) { instance_double("AWS::SQS::Queue", :url => nil) }
- let (:msg_body) {{ :Message => JSON.generate(msg_uri) }}
- let (:msg_uri) {{ :uri => "/content/asset/newsbeat" }}
- let (:message) do
+ let(:cache) { instance_double("Alephant::Cache", :put => nil) }
+ let(:queue) { instance_double("AWS::SQS::Queue", :url => nil) }
+ let(:msg_body) { { :Message => JSON.generate(msg_uri) } }
+ let(:msg_uri) { { :uri => "/content/asset/newsbeat" } }
+ let(:message) do
instance_double(
"AWS::SQS::ReceivedMessage",
:id => "id",
:md5 => "qux",
:queue => queue,
:body => JSON.generate(msg_body)
)
end
- let (:opts) do
+ let(:opts) do
{
:log_archive_message => true,
:async_store => false
}
end
- let (:subject) { described_class.new(cache, opts) }
+ let(:subject) { described_class.new(cache, opts) }
describe "#see" do
- let (:time_now) { DateTime.parse("Feb 24 1981") }
+ let(:time_now) { DateTime.parse("Feb 24 1981") }
context "calls cache put with the correct params" do
before(:each) do
allow(DateTime).to receive(:now).and_return(time_now)
end