Sha256: 7c6db2c51e61b8564a89a15ba2aa86ebec85552669dec28cd19d6a0b71352c7e
Contents?: true
Size: 1.19 KB
Versions: 3
Compression:
Stored size: 1.19 KB
Contents
require 'spec_helper' describe Hydra::Derivatives::Processors::Processor do subject { described_class.new(file_path, directives) } let(:object) { "Fake Object" } let(:source_name) { 'content' } let(:directives) { { thumb: "100x100>" } } let(:file_path) { double } describe "output_file_service" do let(:custom_output_file_service) { "fake service" } let(:another_custom_output_file_service) { "another fake service" } context "with a global configuration setting" do before do allow(Hydra::Derivatives).to receive(:output_file_service).and_return(custom_output_file_service) end it "utilizes the default output file service" do expect(subject.output_file_service).to eq(custom_output_file_service) end end context "with an instance level configuration setting" do subject do described_class.new('/opt/derivatives/foo.mp4', directives, output_file_service: another_custom_output_file_service) end it "accepts a custom output file service as an option" do expect(subject.output_file_service).to eq(another_custom_output_file_service) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hydra-derivatives-3.4.2 | spec/processors/processor_spec.rb |
hydra-derivatives-3.4.1 | spec/processors/processor_spec.rb |
hydra-derivatives-3.4.0 | spec/processors/processor_spec.rb |