Sha256: 09a3a9d7fd69002a058989144f8ddaaff72a799ca55e8b4beea2dcad16cfeb9d
Contents?: true
Size: 880 Bytes
Versions: 14
Compression:
Stored size: 880 Bytes
Contents
require 'spec_helper' def mods_display_audience(mods_record) ModsDisplay::Audience.new(mods_record, ModsDisplay::Configuration::Base.new, double('controller')) end describe ModsDisplay::Contents do before(:all) do @audience = Stanford::Mods::Record.new.from_str( '<mods><targetAudience>Audience Note</targetAudience></mods>', false ).targetAudience @display_label = Stanford::Mods::Record.new.from_str( "<mods><targetAudience displayLabel='Special Label'>Audience Note</tableOfContents></mods>", false ).targetAudience end describe 'label' do it 'should have a default label' do expect(mods_display_audience(@audience).label).to eq('Target audience:') end it 'should use the displayLabel attribute when one is available' do expect(mods_display_audience(@display_label).label).to eq('Special Label:') end end end
Version data entries
14 entries across 14 versions & 1 rubygems