Sha256: 7edfa5ded4a5cf686cc0ab7d2f462d23c06cb6991cc201d5e4b0d6ba6201cccd
Contents?: true
Size: 916 Bytes
Versions: 10
Compression:
Stored size: 916 Bytes
Contents
require 'spec_helper' module BerkeleyLibrary module TIND module Export describe ColumnGroup do describe :new do it 'rejects invalid indicators' do expect { ColumnGroup.new('856', 0, '_', '2', 'uyz'.chars) }.to raise_error(ArgumentError) expect { ColumnGroup.new('856', 0, '2', '_', 'uyz'.chars) }.to raise_error(ArgumentError) end it "allows capital indicators, even if it shouldn't" do cg = ColumnGroup.new('856', 0, 'Q', '1', 'uyz'.chars) expect(cg.ind1).to eq('Q') end end describe :to_s do it 'returns the prefix + subfield codes' do cg = ColumnGroup.new('856', 0, '4', '2', 'uyz'.chars) cg_str = cg.to_s expect(cg_str).to include('85642uyz') expect(cg_str).to include('0') end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems