Sha256: dc83464fb3c714f2e6b071d7da09e922a85ecd3d4f053529d2dca7c1f7fce33b

Contents?: true

Size: 396 Bytes

Versions: 5

Compression:

Stored size: 396 Bytes

Contents

shared_examples_for "a command that does not block" do
  it 'does not block if the command outputs a lot of data' do
    garbage_file = Tempfile.new("garbage")
    10.times{ garbage_file.write("A" * 1024 * 1024) }

    Timeout.timeout(5) do
      output = subject.call("cat '#{garbage_file.path}'")
      $?.exitstatus.should == 0
      output.length.should == 10 * 1024 * 1024
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cocaine-0.5.1 spec/support/nonblocking_examples.rb
cocaine-0.5.0 spec/support/nonblocking_examples.rb
cocaine-0.4.2 spec/support/nonblocking_examples.rb
cocaine-0.4.1 spec/support/nonblocking_examples.rb
cocaine-0.4.0 spec/support/nonblocking_examples.rb