Sha256: 531dd7b154f6ffb46710a612d0416186161600c149b4ce7008f6b4a959356685

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'
module Exlibris
  module Aleph
    module Table
      module Reader
        describe Collections do
          let(:irrelevant_sub_library_codes) { Config.irrelevant_sub_libraries }
          let(:admin_library) { AdminLibrary.new('NYU50') }
          subject(:collections) { Collections.new(admin_library) }
          describe '#filename' do
            subject { collections.filename }
            it { should eq 'tab40.eng' }
          end
          describe '#all' do
            subject { collections.all }
            it { should be_an Array }
            it { should_not be_empty }
            it 'should contain Collections' do
              subject.each do |collection|
                expect(collection).to be_a Collection
              end
            end
            it 'should not include irrelevant codes' do
              subject.find do |collection|
                expect(irrelevant_sub_library_codes).not_to include(collection.sub_library.code)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exlibris-aleph-2.0.4 spec/exlibris/aleph/table/reader/collections_spec.rb
exlibris-aleph-2.0.3 spec/exlibris/aleph/table/reader/collections_spec.rb
exlibris-aleph-2.0.0 spec/exlibris/aleph/table/reader/collections_spec.rb