Sha256: f4f6cff36a9b92a2d4d49f06a8e9388e8dfb707a7e7bb4e8b269cb3c5591d672

Contents?: true

Size: 763 Bytes

Versions: 3

Compression:

Stored size: 763 Bytes

Contents

require 'spec_helper'

describe Configuration do
  context "from hash" do
    before(:all) do
      @config = Configuration.new.from_hash(
        "backend" => "beanstalk",
        "host" => "localhost:11300",
        "queue" => "quebert-config-test")
    end

    it "should configure backend" do
      backend = @config.backend
      expect(backend).to be_instance_of(Quebert::Backend::Beanstalk)
      # Blech, gross nastiness in their lib, but we need to look in to see if this stuff as configed
      expect(backend.send(:beanstalkd_connection).connection.host).to eql("localhost")
      expect(backend.send(:beanstalkd_connection).connection.port).to eql(11300)
      expect(backend.send(:default_tube).name).to eql("quebert-config-test")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
quebert-3.3.0 spec/configuration_spec.rb
quebert-3.2.1 spec/configuration_spec.rb
quebert-3.2.0 spec/configuration_spec.rb