Sha256: 80faf5392945b136a02f9e29fe7cae6eebeaf7a0807d48328e9df3639d07ac5f

Contents?: true

Size: 540 Bytes

Versions: 1

Compression:

Stored size: 540 Bytes

Contents

require 'bacon'
require 'mocha'
require 'mocha-on-bacon'
require 'alias'
include Alias

class Bacon::Context
  def before_all; yield; end
  def xit(*args); end
  def capture_stdout(&block)
    original_stdout = $stdout
    $stdout = fake = StringIO.new
    begin
      yield
    ensure
      $stdout = original_stdout
    end
    fake.string
  end

  def capture_stderr(&block)
    original_stderr = $stderr
    $stderr = fake = StringIO.new
    begin
      yield
    ensure
      $stderr = original_stderr
    end
    fake.string
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alias-0.2.2 test/test_helper.rb