Sha256: 0d2e8629d1a588371b8d762e08376c2a4a2119adaa5a4eabbf0497fff947c0dd

Contents?: true

Size: 687 Bytes

Versions: 4

Compression:

Stored size: 687 Bytes

Contents

# encoding: utf-8

require "spec_helper"
require "amq/settings"

describe AMQ::Settings do
  describe ".default" do
    it "should provide some default values" do
      AMQ::Settings.default.should_not be_nil
      AMQ::Settings.default[:host].should_not be_nil
    end
  end

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
amq-protocol-1.9.2 spec/amq/settings_spec.rb
amq-protocol-1.9.1 spec/amq/settings_spec.rb
amq-protocol-1.9.0 spec/amq/settings_spec.rb
amq-protocol-1.8.0 spec/amq/settings_spec.rb