Sha256: d99513a36b462fa587ac818dc18609a3fa566980ae3b2b621160ea489dd6994e

Contents?: true

Size: 783 Bytes

Versions: 4

Compression:

Stored size: 783 Bytes

Contents

require 'spec_helper'

module BerkeleyLibrary
  module Marc
    module FieldInfo
      module VarFields
        describe VarFieldDef do
          describe 'to_s' do
            let(:fields) { %w[046 048].map { |t| [t, VarFields.standard.find { |vf| vf.tag == t }] }.to_h }

            it 'returns something like an EBCDList' do
              aggregate_failures('to_s') do
                fields.each do |tag, vf|
                  expected = File.read("spec/data/field_info/vf_#{tag}.txt").strip
                  actual = vf.to_s.strip
                  File.write("tmp/actual_#{tag}.txt", actual) unless actual == expected
                  expect(actual).to eq(expected)
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
berkeley_library-marc-0.3.1 spec/berkeley_library/marc/field_info/var_fields/var_field_def_spec.rb
berkeley_library-marc-0.3.0 spec/berkeley_library/marc/field_info/var_fields/var_field_def_spec.rb
berkeley_library-marc-0.2.1 spec/berkeley_library/marc/field_info/var_fields/var_field_def_spec.rb
berkeley_library-marc-0.2.0 spec/berkeley_library/marc/field_info/var_fields/var_field_def_spec.rb