Sha256: 0eacaf7209296c3203a79baa6bffbc091ebb204a2b788a7e378f80b091c92a08

Contents?: true

Size: 984 Bytes

Versions: 69

Compression:

Stored size: 984 Bytes

Contents

require 'spec_helper'

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

69 entries across 69 versions & 1 rubygems

Version Path
active-fedora-5.7.1 spec/unit/config_spec.rb
active-fedora-5.7.0 spec/unit/config_spec.rb
active-fedora-6.1.1 spec/unit/config_spec.rb
active-fedora-6.1.0 spec/unit/config_spec.rb
active-fedora-5.6.3 spec/unit/config_spec.rb
active-fedora-6.0.0 spec/unit/config_spec.rb
active-fedora-6.0.0.rc7 spec/unit/config_spec.rb
active-fedora-6.0.0.rc6 spec/unit/config_spec.rb
active-fedora-6.0.0.rc5 spec/unit/config_spec.rb
active-fedora-6.0.0.rc4 spec/unit/config_spec.rb
active-fedora-6.0.0.rc3 spec/unit/config_spec.rb
active-fedora-6.0.0.rc2 spec/unit/config_spec.rb
active-fedora-6.0.0.rc1 spec/unit/config_spec.rb
active-fedora-5.6.2 spec/unit/config_spec.rb
active-fedora-5.6.1 spec/unit/config_spec.rb
active-fedora-6.0.0.pre10 spec/unit/config_spec.rb
active-fedora-6.0.0.pre9 spec/unit/config_spec.rb
active-fedora-5.6.0 spec/unit/config_spec.rb
active-fedora-6.0.0.pre8 spec/unit/config_spec.rb
active-fedora-6.0.0.pre7 spec/unit/config_spec.rb