Sha256: b298f79a616e7895215747b15183dc0ee71ae378ed59c09841069d007d4151f8
Contents?: true
Size: 645 Bytes
Versions: 12
Compression:
Stored size: 645 Bytes
Contents
require 'spec_helper' describe GenericFile do describe "#virus_check" do before do unless defined? ClamAV class ClamAV def self.instance new end end @stubbed_clamav = true end end after do Object.send(:remove_const, :ClamAV) if @stubbed_clamav end it "should return the results of running ClamAV scanfile method" do # subject.stub(:to_solr).and_return({}) ClamAV.any_instance.should_receive(:scanfile).and_return(1) Sufia::GenericFile::Actions.virus_check(File.new(fixture_path + '/world.png')).should == 1 end end end
Version data entries
12 entries across 12 versions & 1 rubygems