Sha256: b09175aff91f7c97bac204681be387936c3dd3a383b602d6d93cf1499e576901
Contents?: true
Size: 952 Bytes
Versions: 3
Compression:
Stored size: 952 Bytes
Contents
require 'spec_helper' describe Hydra::Derivatives do before(:all) do class CustomFile < ActiveFedora::Base include Hydra::Derivatives end end after(:all) { Object.send(:remove_const, :CustomFile) } describe "source_file_service" do before { subject.source_file_service = custom_source_file_service } context "as a global configuration setting" do let(:custom_source_file_service) { "fake service" } subject { CustomFile } it "utilizes the default source file service" do expect(subject.source_file_service).to eq(custom_source_file_service) end end context "as an instance level configuration setting" do let(:custom_source_file_service) { "another fake service" } subject { CustomFile.new } it "accepts a custom source file service as an option" do expect(subject.source_file_service).to eq(custom_source_file_service) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hydra-derivatives-3.2.1 | spec/units/derivatives_spec.rb |
hydra-derivatives-3.2.0 | spec/units/derivatives_spec.rb |
hydra-derivatives-3.1.4 | spec/units/derivatives_spec.rb |