Sha256: 7f45acba37f2f17d55ad91d92a321912b1b920b8c682fa4c8f47b49b770a2635
Contents?: true
Size: 730 Bytes
Versions: 4
Compression:
Stored size: 730 Bytes
Contents
require 'spec_helper' module MARC::Spec module Queries describe IndicatorValue do it 'accepts an int indicator' do v = IndicatorValue.new(1) expect(v.ind).to eq(1) expect(v.to_s).to eq('^1') end it 'accepts a string indicator' do v = IndicatorValue.new('1') expect(v.ind).to eq(1) expect(v.to_s).to eq('^1') end it 'rejects a nil indicator' do expect { IndicatorValue.new(nil) }.to raise_error(ArgumentError) end it 'rejects an invalid indicator' do expect { IndicatorValue.new(3) }.to raise_error(ArgumentError) expect { IndicatorValue.new('3') }.to raise_error(ArgumentError) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems