Sha256: 6a805b272363dc963afab8c32600228ca22074e2ea7eab9326788e87e20e9ac8
Contents?: true
Size: 785 Bytes
Versions: 8
Compression:
Stored size: 785 Bytes
Contents
require 'spec_helper' describe HSS::Parser do let(:config) { 'spec/test/config.yml' } let(:handler) { HSS::Handler.new config } describe '#command' do it 'runs shell commands' do expect(handler.handle 'cmd_bar').to eql 'bar@example.org' end context 'if the command is invalid' do it 'raises an error' do expect { handler.handle 'failcmd_zsxdcf' }.to raise_error RuntimeError end end context 'if the command is not executable' do it 'raises an error' do expect { handler.handle 'failcmd_LICENSE' }.to raise_error RuntimeError end end context 'if the command fails' do it 'raises an error' do expect { handler.handle 'failcmd_false' }.to raise_error RuntimeError end end end end
Version data entries
8 entries across 8 versions & 1 rubygems