Sha256: a282f467e2d306ebc5883a40fe8eeb8fb00455e190424cb2f4910f747513ab25
Contents?: true
Size: 772 Bytes
Versions: 14
Compression:
Stored size: 772 Bytes
Contents
require 'spec_helper' describe CharacterizeJob do before do allow_any_instance_of(GenericFile).to receive(:reload_on_save?).and_return(false) # Don't actually create the derivatives -- that is tested elsewhere allow_any_instance_of(GenericFile).to receive(:create_derivatives) @generic_file = GenericFile.new.tap do |gf| gf.apply_depositor_metadata('jcoyne@example.com') gf.add_file(File.open(fixture_path + '/charter.docx'), 'content', 'charter.docx') gf.save end end after do @generic_file.destroy end subject { CharacterizeJob.new(@generic_file.id)} it 'spawns a CreateDerivatives job' do expect(CreateDerivativesJob).to receive(:new).with(@generic_file.id).once.and_call_original subject.run end end
Version data entries
14 entries across 14 versions & 1 rubygems