Sha256: 957411f4a0bfcd3a0cb8f0a88ca1eb21b0951989dd9193b5d0bb910320355846
Contents?: true
Size: 876 Bytes
Versions: 55
Compression:
Stored size: 876 Bytes
Contents
module Ddr::Models RSpec.describe FileCharacterization do subject { described_class.new(obj) } before { obj.content.checksumType = "SHA-1" obj.save! } let(:obj) { FactoryGirl.create(:component) } let(:fits_output) { "<fits/>" } describe "when there is an error running FITS" do before { allow(subject).to receive(:run_fits).and_raise(FileCharacterization::FITSError) } specify { begin subject.call rescue FileCharacterization::FITSError ensure expect(subject.fits).not_to have_content end } end describe "when FITS runs successfully" do before { allow(subject).to receive(:run_fits) { fits_output } } specify { subject.call expect(subject.fits.content).to eq(fits_output) } end end end
Version data entries
55 entries across 55 versions & 1 rubygems