Sha256: 83cee2780ae2aeaa109537030c7bbc32040deefa625d43155ed76c9674b28507
Contents?: true
Size: 528 Bytes
Versions: 9
Compression:
Stored size: 528 Bytes
Contents
#!/usr/bin/env ruby require 'rspec' require 'panoptimon' describe('collector exec must exist') { this = ->(setup) { setup.call() Panoptimon::Collector.new( command: ['nosuchfilehere'], bus: not(nil) ); } it('complains if command file does not exist') { expect {this.call(->(){})}. to raise_exception(/no such file/) } it('complains if command file is not executable') { expect {this.call(->(){File.stub('exist?') {true}})}. to raise_exception(/is not executable/) } }
Version data entries
9 entries across 9 versions & 1 rubygems