Sha256: 7228deb586db9d6787bca8a6fd6b78fd941d8a251250166d4644b5ae136fbc55

Contents?: true

Size: 668 Bytes

Versions: 5

Compression:

Stored size: 668 Bytes

Contents

require "amq/settings"

RSpec.describe AMQ::Settings do
  describe ".default" do
    it "should provide some default values" do
      expect(AMQ::Settings.default).to_not be_nil
      expect(AMQ::Settings.default[:host]).to_not be_nil
    end
  end

  describe ".configure(&block)" do
    it "should merge custom settings with default settings" do
      settings = AMQ::Settings.configure(:host => "tagadab")
      expect(settings[:host]).to eql("tagadab")
    end

    it "should merge custom settings from AMQP URL with default settings" do
      settings = AMQ::Settings.configure("amqp://tagadab")
      expect(settings[:host]).to eql("tagadab")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amq-protocol-2.3.2 spec/amq/settings_spec.rb
amq-protocol-2.3.1 spec/amq/settings_spec.rb
amq-protocol-2.3.0 spec/amq/settings_spec.rb
amq-protocol-2.3.0.rc2 spec/amq/settings_spec.rb
amq-protocol-2.3.0.rc1 spec/amq/settings_spec.rb