Sha256: 46384c5b62fd8cde4c67e634000a7919560680abcb3a10fed63dd2ebe87ee328

Contents?: true

Size: 605 Bytes

Versions: 6

Compression:

Stored size: 605 Bytes

Contents

RSpec.shared_examples 'an adapter' do
  describe '#new_context' do
    it 'returns a MessageDriver::Adapters::ContextBase' do
      expect(subject.new_context).to be_a MessageDriver::Adapters::ContextBase
    end
  end

  describe '#stop' do
    it 'invalidates all the adapter contexts' do
      ctx1 = subject.new_context
      ctx2 = subject.new_context
      subject.stop
      expect(ctx1).to_not be_valid
      expect(ctx2).to_not be_valid
    end
  end

  describe '#broker' do
    it 'returns the broker associated with the adapter' do
      expect(subject.broker).to be(broker)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
message-driver-0.6.1 spec/support/shared/adapter_examples.rb
message-driver-0.6.0 spec/support/shared/adapter_examples.rb
message-driver-0.5.3 spec/support/shared/adapter_examples.rb
message-driver-0.5.2 spec/support/shared/adapter_examples.rb
message-driver-0.5.1 spec/support/shared/adapter_examples.rb
message-driver-0.5.0 spec/support/shared/adapter_examples.rb