spec/units/message_driver/destination_spec.rb in message-driver-0.6.1 vs spec/units/message_driver/destination_spec.rb in message-driver-0.7.0
- old
+ new
@@ -1,11 +1,13 @@
require 'spec_helper'
module MessageDriver
module Destination
RSpec.describe Base do
- subject(:destination) { Base.new(nil, nil, nil, nil) }
+ let(:broker) { Broker.configure(:test, adapter: TestAdapter) }
+ let(:adapter) { broker.adapter }
+ subject(:destination) { Base.new(adapter, nil, nil, nil) }
describe '#middlware' do
it { expect(subject.middleware).to be_a Middleware::MiddlewareStack }
end
@@ -15,10 +17,10 @@
describe '#subscribe' do
it 'raises an error' do
expect do
consumer = ->(_) {}
destination.subscribe(&consumer)
- end.to raise_error "#subscribe is not supported by #{destination.class}"
+ end.to raise_error "#subscribe is not supported by #{TestAdapter}"
end
end
end
end
end