Sha256: 9f2c03586459d7534f92bb7d5528deea24fc1ca3d536813379549d9200c18c93
Contents?: true
Size: 732 Bytes
Versions: 5
Compression:
Stored size: 732 Bytes
Contents
require 'spec_helper' describe Cocaine::CommandLine::PopenRunner do if Cocaine::CommandLine::PopenRunner.supported? it_behaves_like 'a command that does not block' it 'runs the command given and captures the output in an Output' do output = subject.call("echo hello") expect(output).to have_output "hello\n" end it 'modifies the environment and runs the command given' do output = subject.call("echo $yes", {"yes" => "no"}) expect(output).to have_output "no\n" end it 'sets the exitstatus when a command completes' do subject.call("ruby -e 'exit 0'") $?.exitstatus.should == 0 subject.call("ruby -e 'exit 5'") $?.exitstatus.should == 5 end end end
Version data entries
5 entries across 5 versions & 3 rubygems