Sha256: 3bd9a88ccdb0386f524d0e99f4b022324fd08661bece8f78873ca2698eff93b9

Contents?: true

Size: 927 Bytes

Versions: 5

Compression:

Stored size: 927 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe ArchivesSpace::Configuration do
  it 'uses the default profile for configuration settings' do
    config = ArchivesSpace::Configuration.new
    expect(config.base_uri).to eq DEFAULT_BASE_URI
  end

  it 'allows configuration settings to be provided' do
    config = ArchivesSpace::Configuration.new({
                                                base_uri: CUSTOM_BASE_URI
                                              })
    expect(config.base_uri).to eq CUSTOM_BASE_URI
  end

  it 'allows the configuration properties to be updated' do
    config = ArchivesSpace::Configuration.new
    config.base_uri = CUSTOM_BASE_URI
    expect(config.base_uri).to eq CUSTOM_BASE_URI
  end

  it 'ignores unrecognized configuration properties' do
    config = ArchivesSpace::Configuration.new({ xyz: 123 })
    expect { config.xyz }.to raise_error(NoMethodError)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
archivesspace-client-0.1.12 spec/archivesspace/configuration_spec.rb
archivesspace-client-0.1.11 spec/archivesspace/configuration_spec.rb
archivesspace-client-0.1.10 spec/archivesspace/configuration_spec.rb
archivesspace-client-0.1.8 spec/archivesspace/configuration_spec.rb
archivesspace-client-0.1.7 spec/archivesspace/configuration_spec.rb