spec/lib/geoblacklight/metadata_transformer/base_spec.rb in geoblacklight-2.4.0 vs spec/lib/geoblacklight/metadata_transformer/base_spec.rb in geoblacklight-3.0.0
- old
+ new
@@ -1,17 +1,18 @@
+# frozen_string_literal: true
require 'spec_helper'
describe Geoblacklight::MetadataTransformer::Base do
describe '.new' do
it 'raises an error for empty XML' do
expect { described_class.new(nil) }.to raise_error Geoblacklight::MetadataTransformer::EmptyMetadataError
end
end
context 'with metadata types without XSL Stylesheets' do
- let(:metadata) { instance_double(GeoCombine::Metadata) }
subject { described_class.new(metadata) }
+ let(:metadata) { instance_double(GeoCombine::Metadata) }
describe '#transform' do
before do
allow(metadata).to receive(:to_html).and_raise(NoMethodError, 'undefined method `to_html\'')
end
it 'raises a transform error' do
@@ -19,11 +20,11 @@
end
end
end
context 'with metadata types with XSL Stylesheets but invalid HTML' do
- let(:metadata) { instance_double(GeoCombine::Metadata) }
subject { described_class.new(metadata) }
+ let(:metadata) { instance_double(GeoCombine::Metadata) }
describe '#transform' do
before do
allow(metadata).to receive(:to_html).and_return('<invalid-html></invalid-html>')
end
it 'raises a transform error' do