Sha256: f354c54a4c009ce4cf70610165ca54c971a1adb53f1a4eeb38c53467acac5d3e

Contents?: true

Size: 599 Bytes

Versions: 1

Compression:

Stored size: 599 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
message-driver-0.3.0 spec/support/shared/adapter_examples.rb