Sha256: 2ef08bd9260bde2dd8898ec4f60b7eebccb449a2a1603b853148b441ee14b423

Contents?: true

Size: 496 Bytes

Versions: 2

Compression:

Stored size: 496 Bytes

Contents

require 'spec_helper'

describe Cocaine::CommandLine::BackticksRunner do
  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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocaine-0.3.1 spec/cocaine/command_line/runners/backticks_runner_spec.rb
cocaine-0.3.0 spec/cocaine/command_line/runners/backticks_runner_spec.rb