Sha256: 6d2b5fdd539c7f32410a3a2b43af48b547fa3182b0d28115bdb6e09775d50d67
Contents?: true
Size: 1.4 KB
Versions: 10
Compression:
Stored size: 1.4 KB
Contents
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
10 entries across 10 versions & 1 rubygems