Sha256: 0c3711ab7f13879b6c9fb102cfa5a23f3fb697448fd347574a33ced24793b614
Contents?: true
Size: 789 Bytes
Versions: 24
Compression:
Stored size: 789 Bytes
Contents
require 'spec_helper' require 'celluloid' require 'writefully/tools' require 'writefully/workers' module Writefully module Workers describe Journalist do let(:message) { { resource: 'posts', slug: '1-hash-selector-pattern' } } let(:message_with_tries) { message.merge({tries: 2, run: false}) } let(:pencil) { double("Pencil", perform: true) } subject(:journalist) { Journalist.new } before do Journalist.any_instance.stub(:message).and_return(message) Tools::Pencil.stub(:new_link).and_return(pencil) end its(:message_with_tries) { should eq message_with_tries } it "#publish" do pencil.should_receive(:perform).once subject.publish end after { subject.terminate } end end end
Version data entries
24 entries across 24 versions & 1 rubygems