Sha256: 20e29e5cec129fd85e5164ca3154115a146453b6c16a638f9900fe6d8c475235

Contents?: true

Size: 986 Bytes

Versions: 26

Compression:

Stored size: 986 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::Config do
  describe "with a single fedora instance" do
    conf = Psych.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 = Psych.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

26 entries across 26 versions & 1 rubygems

Version Path
active-fedora-7.3.1 spec/unit/config_spec.rb
active-fedora-7.3.0 spec/unit/config_spec.rb
active-fedora-8.2.1 spec/unit/config_spec.rb
active-fedora-8.2.0 spec/unit/config_spec.rb
active-fedora-7.2.0 spec/unit/config_spec.rb
active-fedora-8.1.0 spec/unit/config_spec.rb
active-fedora-8.0.1 spec/unit/config_spec.rb
active-fedora-8.0.0 spec/unit/config_spec.rb
active-fedora-8.0.0.rc3 spec/unit/config_spec.rb
active-fedora-8.0.0.rc2 spec/unit/config_spec.rb
active-fedora-8.0.0.rc1 spec/unit/config_spec.rb
active-fedora-7.1.2 spec/unit/config_spec.rb
active-fedora-7.1.1 spec/unit/config_spec.rb
active-fedora-7.1.0 spec/unit/config_spec.rb
active-fedora-7.0.4 spec/unit/config_spec.rb
active-fedora-7.0.3 spec/unit/config_spec.rb
active-fedora-7.0.2 spec/unit/config_spec.rb
active-fedora-7.0.1 spec/unit/config_spec.rb
active-fedora-7.0.0 spec/unit/config_spec.rb
active-fedora-7.0.0.rc3 spec/unit/config_spec.rb