Sha256: de56bf0e355e4bc23df792f1d3ed483ddb9931b8f56895ef2caee2856e34a1d6
Contents?: true
Size: 586 Bytes
Versions: 1
Compression:
Stored size: 586 Bytes
Contents
require 'test_helper' require_relative '../../lib/nesta/commands' class TestCommand include Nesta::Commands::Command end describe 'Nesta::Commands::Command' do describe '#run_process' do it 'catches errors when running external processes' do TestCommand.new.run_process('ls / >/dev/null') begin stderr, $stderr = $stderr, File.open('/dev/null', 'w') assert_raises(SystemExit) do TestCommand.new.run_process('ls no-such-file 2>/dev/null') end ensure $stderr.close $stderr = stderr end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nesta-0.12.0 | test/unit/commands_test.rb |