Sha256: c0fe6bf89d7151b932366215a75f7548069d4cbd3643d95f6e7dd920cfc70e4d

Contents?: true

Size: 661 Bytes

Versions: 7

Compression:

Stored size: 661 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', 'tube' => '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.instance_variable_get('@addrs').should eql(['localhost:11300'])
      backend.instance_variable_get('@default_tube').should eql('quebert-config-test')
    end
    
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
quebert-1.0.9 spec/configuration_spec.rb
quebert-1.0.8 spec/configuration_spec.rb
quebert-1.0.7 spec/configuration_spec.rb
quebert-1.0.6 spec/configuration_spec.rb
quebert-1.0.5 spec/configuration_spec.rb
quebert-1.0.4 spec/configuration_spec.rb
quebert-1.0.2 spec/configuration_spec.rb