Sha256: 63ea0a8bd731682c68744f3e703edb49b9a4b50ce79b6b708d60701705d51e07

Contents?: true

Size: 514 Bytes

Versions: 2

Compression:

Stored size: 514 Bytes

Contents

require 'spec_helper'

RSpec.describe VirusScanService::KasperskyRunner::LinuxExecutor do
  subject { described_class.new  }

  let(:desired_cmd) {
    'sudo ' +
    '/opt/kaspersky/kes4lwks/bin/kes4lwks-control ' +
    '--scan-file /tmp/scan_file'
  }

  describe '#scan' do
    it 'should exectute correct command' do
      expect(Open3)
        .to receive(:capture3)
        .with(desired_cmd)

      subject.scan(Pathname.new('/tmp').join('scan_file'), Pathname.new('/tmp').join('bar.log'))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
virus_scan_service-0.2.1 spec/kaspersky_runner/linux_executor_spec.rb
virus_scan_service-0.2.0 spec/kaspersky_runner/linux_executor_spec.rb