Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (17 sloc) 557 Bytes
require 'spec_helper'
describe Cocaine::CommandLine::ProcessRunner do
if Process.respond_to?(:spawn)
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
Jump to Line
Something went wrong with that request. Please try again.