Sha256: dd832d8e31f2bc78738a0640e9203bcdb77d8941177d5e75c953e80fc001ec28

Contents?: true

Size: 629 Bytes

Versions: 9

Compression:

Stored size: 629 Bytes

Contents

require 'spec_helper'

describe Cocaine::CommandLine::ProcessRunner do
  if Cocaine::CommandLine::ProcessRunner.supported?
    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

9 entries across 9 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/cocaine-0.5.7/spec/cocaine/command_line/runners/process_runner_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/cocaine-0.5.7/spec/cocaine/command_line/runners/process_runner_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/cocaine-0.5.7/spec/cocaine/command_line/runners/process_runner_spec.rb
cocaine-0.5.7 spec/cocaine/command_line/runners/process_runner_spec.rb
cocaine-0.5.6 spec/cocaine/command_line/runners/process_runner_spec.rb
cocaine-0.5.5 spec/cocaine/command_line/runners/process_runner_spec.rb
cocaine-0.5.4 spec/cocaine/command_line/runners/process_runner_spec.rb
cocaine-0.5.3 spec/cocaine/command_line/runners/process_runner_spec.rb
cocaine-0.5.2 spec/cocaine/command_line/runners/process_runner_spec.rb