Sha256: b136004f9e7fbad8830ed4f924dc3c542afd5d4e82c4ccfab864749165d447b8
Contents?: true
Size: 732 Bytes
Versions: 6
Compression:
Stored size: 732 Bytes
Contents
RSpec.shared_examples "a fixity checkable object" do describe "fixity check" do before do subject.thumbnail.content = '1234567890' subject.save(validate: false) end specify { expect { subject.check_fixity }.to change(subject.fixity_checks, :count).from(0).to(1) } describe "results" do let(:results) { subject.check_fixity } specify { expect(results).to be_success } specify { expect(results[:thumbnail]).to be true } describe "failure" do before { allow(subject.thumbnail).to receive(:check_fixity) { false } } specify { expect(results).not_to be_success } end end end end
Version data entries
6 entries across 6 versions & 1 rubygems