Sha256: 1cac7c8bcf6910e10df66c5914515ec5d04e8aee3be56b73962ed392f2058cc2

Contents?: true

Size: 368 Bytes

Versions: 1

Compression:

Stored size: 368 Bytes

Contents

require 'open3'
require_relative '../lib/xcbootstrap'
include XCBootstrap

def run_command cmd
  stdin, stdout, stderr, wait_thr = Open3.popen3(cmd)
  return wait_thr.value.success?, stdout.read
end

def capture_stdout(&block)
  original_stdout = $stdout
  $stdout = fake = StringIO.new
  begin
    yield
  ensure
    $stdout = original_stdout
  end
  fake.string
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xcbootstrap-0.1.0 spec/spec_helper.rb