Sha256: edceb22c885134564df35405831cbf786d45ff9e753a9876e523025c491ef792

Contents?: true

Size: 852 Bytes

Versions: 5

Compression:

Stored size: 852 Bytes

Contents

RSpec.describe NulogyMessageBusConsumer do
  describe "#configure" do
    before do
      config = NulogyMessageBusConsumer.config
      config.instance_variable_names.each do |variable_name|
        config.remove_instance_variable(variable_name)
      end
    end

    it "allows configuration to be provided as arguments" do
      NulogyMessageBusConsumer.configure(
        bootstrap_servers: "some servers"
      )

      expect(NulogyMessageBusConsumer.config).to have_attributes(
        bootstrap_servers: "some servers"
      )
    end

    it "allows configuration to be provided as a block" do
      NulogyMessageBusConsumer.configure do |config|
        config.bootstrap_servers = "some servers"
      end

      expect(NulogyMessageBusConsumer.config).to have_attributes(
        bootstrap_servers: "some servers"
      )
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nulogy_message_bus_consumer-3.0.0 spec/unit/nulogy_message_bus_consumer_spec.rb
nulogy_message_bus_consumer-2.0.1 spec/unit/nulogy_message_bus_consumer_spec.rb
nulogy_message_bus_consumer-2.0.0 spec/unit/nulogy_message_bus_consumer_spec.rb
nulogy_message_bus_consumer-1.0.0 spec/unit/nulogy_message_bus_consumer_spec.rb
nulogy_message_bus_consumer-0.5.0 spec/unit/nulogy_message_bus_consumer_spec.rb