Sha256: f125c9e693cefbd351b3e66cd8604da1815c155eef474079836db5ff65afbfe9

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 Bytes

Contents

require 'songkick_queue'

RSpec.describe SongkickQueue do
  describe "#configure" do
    it "should yield instance of Configuration" do
      expect { |b|
        SongkickQueue.configure(&b)
      }.to yield_with_args instance_of(SongkickQueue::Configuration)
    end
  end

  describe "#publish" do
    it "should call #publish on instance Producer" do
      producer = instance_double(SongkickQueue::Producer)
      allow(SongkickQueue).to receive(:producer) { producer }

      expect(producer).to receive(:publish).with(:queue_name, :message)

      SongkickQueue.publish(:queue_name, :message)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
songkick_queue-0.2.0 spec/songkick_queue_spec.rb
songkick_queue-0.1.0 spec/songkick_queue_spec.rb