spec/units/message_driver/destination_spec.rb in message-driver-0.4.0 vs spec/units/message_driver/destination_spec.rb in message-driver-0.5.0
- old
+ new
@@ -1,20 +1,25 @@
require 'spec_helper'
-module MessageDriver::Destination
- describe Base do
- subject(:destination) { Base.new(nil, nil, nil, nil) }
+module MessageDriver
+ module Destination
+ RSpec.describe Base do
+ subject(:destination) { Base.new(nil, nil, nil, nil) }
- it 'needs some real tests'
+ describe '#middlware' do
+ it { expect(subject.middleware).to be_a Middleware::MiddlewareStack }
+ end
- include_examples "doesn't support #message_count"
+ include_examples "doesn't support #message_count"
+ include_examples "doesn't support #consumer_count"
- describe '#subscribe' do
- it 'raises an error' do
- expect {
- consumer = lambda do |_| end
- destination.subscribe(&consumer)
- }.to raise_error "#subscribe is not supported by #{destination.class}"
+ 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
end
end
end
end