Sha256: 89e6768708fee9f9c0a8949ab492ead1e957d567af189b7fcd3953611037a2e2

Contents?: true

Size: 856 Bytes

Versions: 11

Compression:

Stored size: 856 Bytes

Contents

require 'spec_helper'

module MessageDriver
  module Middleware
    RSpec.describe Base do
      let(:destination) { double(Destination) }
      subject(:middleware_base) { described_class.new(destination) }

      let(:body) { double('body') }
      let(:headers) { double('headers') }
      let(:properties) { double('properties') }

      describe '#destination' do
        it { expect(subject.destination).to be destination }
      end

      describe '#on_publish' do
        it 'just returns the input values' do
          expect(subject.on_publish(body, headers, properties)).to eq [body, headers, properties]
        end
      end

      describe '#on_consume' do
        it 'just returns the input values' do
          expect(subject.on_consume(body, headers, properties)).to eq [body, headers, properties]
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
message-driver-1.0.1 spec/units/message_driver/middleware/base_spec.rb
message-driver-1.0.0 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.7.2 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.7.1 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.7.0 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.6.1 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.6.0 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.5.3 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.5.2 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.5.1 spec/units/message_driver/middleware/base_spec.rb
message-driver-0.5.0 spec/units/message_driver/middleware/base_spec.rb