Sha256: 47eefaa929b3cc770619cd8c7f5f1d4c87fd14daae38fcebc7eb5eda75d2192d

Contents?: true

Size: 694 Bytes

Versions: 7

Compression:

Stored size: 694 Bytes

Contents

require 'aruba/process'

module Aruba
  describe Process do

    let(:process) { Process.new('echo "yo"', 0, 0.1) }

    describe "#stdout" do
      before { process.run! }

      it "returns the stdout" do
        process.stdout(false).should == "yo\n"
      end

      it "returns all the stdout, every time you call it" do
        process.stdout(false).should == "yo\n"
        process.stdout(false).should == "yo\n"
      end

    end

    describe "#stop" do
      before { process.run! }

      it "sends any output to the reader" do
        reader = stub.as_null_object
        reader.should_receive(:stdout).with("yo\n")
        process.stop(reader, false)
      end
    end

  end
end

Version data entries

7 entries across 7 versions & 4 rubygems

Version Path
aruba-0.5.0 spec/aruba/process_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/aruba-0.4.11/spec/aruba/process_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/aruba-0.4.11/spec/aruba/process_spec.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/aruba-0.4.11/spec/aruba/process_spec.rb
ftl-0.2.0 vendor/bundle/gems/aruba-0.4.11/spec/aruba/process_spec.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/aruba-0.4.11/spec/aruba/process_spec.rb
aruba-0.4.11 spec/aruba/process_spec.rb