Sha256: 004004606f7dbe2b57bd23a8eb647d7f6abb8aa7a20e79049b0329f3045ca77c
Contents?: true
Size: 1.43 KB
Versions: 20
Compression:
Stored size: 1.43 KB
Contents
# frozen_string_literal: true require 'spec_helper' describe Geoblacklight::Metadata do describe '.instance' do let(:reference) { instance_double(Geoblacklight::Reference) } context 'with an FGDC metadata reference' do before do allow(reference).to receive(:type).and_return('fgdc') end it 'constructs an Geoblacklight::Metadata::Fgdc instance' do expect(described_class.instance(reference)).to be_a Geoblacklight::Metadata::Fgdc end end context 'with an ISO19139 metadata reference' do before do allow(reference).to receive(:type).and_return('iso19139') end it 'constructs an Geoblacklight::Metadata::Iso19139 instance' do expect(described_class.instance(reference)).to be_a Geoblacklight::Metadata::Iso19139 end end context 'with an html metadata reference' do before do allow(reference).to receive(:type).and_return('html') end it 'constructs an Geoblacklight::Metadata::Html instance' do expect(described_class.instance(reference)).to be_a Geoblacklight::Metadata::Html end end context 'with another metadata reference' do before do allow(reference).to receive(:type).and_return('unsupported') end it 'constructs an Geoblacklight::Metadata::Base instance' do expect(described_class.instance(reference)).to be_a Geoblacklight::Metadata::Base end end end end
Version data entries
20 entries across 20 versions & 1 rubygems