Sha256: 104c85cfb018edc752119810a8ed1133d1b5b9d460c6064e727a3803ceca117c
Contents?: true
Size: 626 Bytes
Versions: 6
Compression:
Stored size: 626 Bytes
Contents
require 'spec_helper' describe Cocaine::CommandLine::PosixRunner do if Cocaine::CommandLine::posix_spawn_available? it_behaves_like 'a command that does not block' it 'runs the command given' do subject.call("echo hello").should == "hello\n" end it 'modifies the environment and runs the command given' do subject.call("echo $yes", {"yes" => "no"}).should == "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
6 entries across 6 versions & 1 rubygems