Sha256: c279db18a781297b70f965e4c8cef46c5b43178bf43afaf1f3fe1bd4a0fb73e5

Contents?: true

Size: 998 Bytes

Versions: 34

Compression:

Stored size: 998 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::Config do
  describe "with a single fedora instance" do
    conf = YAMLAdaptor.load(File.read('spec/fixtures/rails_root/config/fedora.yml'))['test']
    subject { ActiveFedora::Config.new(conf) }
    its(:credentials) { should == {:url => 'http://testhost.com:8983/fedora', :user=> 'fedoraAdmin', :password=> 'fedoraAdmin'}}
    it { should_not be_sharded }
  end
  describe "with several fedora shards" do
    conf = YAMLAdaptor.load(File.read('spec/fixtures/sharded_fedora.yml'))['test']
    subject { ActiveFedora::Config.new(conf) }
    its(:credentials) { should == [{:url => 'http://127.0.0.1:8983/fedora1', :user=> 'fedoraAdmin', :password=> 'fedoraAdmin'},
                              {:url => 'http://127.0.0.1:8983/fedora2', :user=> 'fedoraAdmin', :password=> 'fedoraAdmin'},
                              {:url => 'http://127.0.0.1:8983/fedora3', :user=> 'fedoraAdmin', :password=> 'fedoraAdmin'}]}
    it { should be_sharded }
  end

end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
active-fedora-6.7.8 spec/unit/config_spec.rb
active-fedora-6.7.7 spec/unit/config_spec.rb
active-fedora-7.0.0.rc2 spec/unit/config_spec.rb
active-fedora-6.7.6 spec/unit/config_spec.rb
active-fedora-7.0.0.rc1 spec/unit/config_spec.rb
active-fedora-6.7.5 spec/unit/config_spec.rb
active-fedora-7.0.0.pre3 spec/unit/config_spec.rb
active-fedora-6.7.4 spec/unit/config_spec.rb
active-fedora-7.0.0.pre2 spec/unit/config_spec.rb
active-fedora-7.0.0.pre1 spec/unit/config_spec.rb
active-fedora-6.7.3 spec/unit/config_spec.rb
active-fedora-6.7.2 spec/unit/config_spec.rb
active-fedora-6.7.1 spec/unit/config_spec.rb
active-fedora-6.7.0 spec/unit/config_spec.rb
active-fedora-6.7.0.rc1 spec/unit/config_spec.rb
active-fedora-6.6.1 spec/unit/config_spec.rb
active-fedora-6.6.0 spec/unit/config_spec.rb
active-fedora-6.6.0.rc5 spec/unit/config_spec.rb
active-fedora-6.6.0.rc4 spec/unit/config_spec.rb
active-fedora-6.6.0.rc3 spec/unit/config_spec.rb