Sha256: 029512f0997a59e80e96e128f33206b5db026338e5470cef912ee9b767e73db3

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 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
      backend.should 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
      backend.send(:beanstalkd_connection).connection.host.should eql("localhost")
      backend.send(:beanstalkd_connection).connection.port.should eql(11300)
      backend.send(:default_tube).name.should eql("quebert-config-test")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
quebert-3.0.3 spec/configuration_spec.rb
quebert-3.0.2 spec/configuration_spec.rb
quebert-3.0.1 spec/configuration_spec.rb
quebert-3.0.0 spec/configuration_spec.rb