Sha256: 6dc1ecd004fad709304fbeaa34bbbd21d7c766d24673f47c5544862d8e4cf133
Contents?: true
Size: 1.01 KB
Versions: 20
Compression:
Stored size: 1.01 KB
Contents
RSpec.shared_examples "an object that can have an intermediate file" do subject { described_class.new(title: [ "I Have An Intermediate File!" ]) } describe "save" do describe "when a new intermediate file is present" do context "and it's a new object" do before { subject.add_file file, "intermediateFile" } let(:file) { fixture_file_upload("imageA.jpg", "image/jpeg") } it "should generate derivatives" do expect_any_instance_of(Ddr::Managers::DerivativesManager).to receive(:update_derivatives) subject.save end end context "and it's an existing object with an intermediate file" do before { subject.upload! fixture_file_upload('imageA.jpg', 'image/jpeg') } let(:file) { fixture_file_upload("imageB.jpg", "image/jpeg") } it "should generate derivatives" do expect_any_instance_of(Ddr::Managers::DerivativesManager).to receive(:update_derivatives) subject.upload! file end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems