Sha256: cfe94f6fb25987c6d8d0e5befbfc7d954d8828820563e272879ab7dd927c4e18

Contents?: true

Size: 522 Bytes

Versions: 20

Compression:

Stored size: 522 Bytes

Contents

require 'spec_helper'

describe BigBrother::ShellExecutor do
  describe "#invoke" do
    run_in_reactor

    it "runs a command" do
      executor = BigBrother::ShellExecutor.new
      output, exit_status = executor.invoke('echo hi')
      output.should == "hi\n"
      exit_status.should == 0
    end

    it "failed command" do
      executor = BigBrother::ShellExecutor.new
      output, exit_status = executor.invoke('test -e /this/isnt/here')
      output.should == ""
      exit_status.should == 1
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
big_brother-0.8.8.1 spec/big_brother/shell_executor_spec.rb
big_brother-0.8.8 spec/big_brother/shell_executor_spec.rb
big_brother-0.8.7 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.8 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.7 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.6 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.5 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.4 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.3 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.2 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.1 spec/big_brother/shell_executor_spec.rb
big_brother-0.6.0 spec/big_brother/shell_executor_spec.rb
big_brother-0.5.0 spec/big_brother/shell_executor_spec.rb
big_brother-0.4.1 spec/big_brother/shell_executor_spec.rb
big_brother-0.4.0 spec/big_brother/shell_executor_spec.rb
big_brother-0.3.1 spec/big_brother/shell_executor_spec.rb
big_brother-0.3.0 spec/big_brother/shell_executor_spec.rb
big_brother-0.2.1 spec/big_brother/shell_executor_spec.rb
big_brother-0.2.0 spec/big_brother/shell_executor_spec.rb
big_brother-0.1.0 spec/big_brother/shell_executor_spec.rb