Sha256: db984ca478ebf62d40b15f2c945a7660d3f62afcfbf3ccc49659b4424f843cf4
Contents?: true
Size: 823 Bytes
Versions: 11
Compression:
Stored size: 823 Bytes
Contents
require 'spec_helper' module MessageDriver module Subscription RSpec.describe Base do let(:adapter) { double(MessageDriver::Adapters::Base) } let(:destination) { double(MessageDriver::Destination::Base) } let(:consumer) { double('a consumer') } subject(:subscription) { Base.new(adapter, destination, consumer) } it "sets it's adapter, destination and consumer on instansiation" do expect(subscription.adapter).to eq(adapter) expect(subscription.destination).to eq(destination) expect(subscription.consumer).to eq(consumer) end describe '#unsubscribe' do it 'raises an error' do expect do subscription.unsubscribe end.to raise_error('must be implemented in subclass') end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems