Sha256: a6972eba9fe402ecbd62dde5c712a8b7ff6231714f35db5164d8c3e14bd3e0c1

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

# -*- coding: utf-8 -*-
#
# std lib
#
require 'stringio'
require 'ostruct'

require 'rspec/collection_matchers'

#
# gem
#
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'tree_rb'
require 'tree_rb_cli'
include TreeRb

FIXTURES = File.expand_path( File.join( File.dirname(__FILE__), 'fixtures') )

def capture_output
  old_stdout, old_stderr = $stdout, $stderr
  out = StringIO.new
  err = StringIO.new
  $stdout = out
  $stderr = err
  begin
    yield
  ensure
    $stdout = old_stdout
    $stderr = old_stderr
  end
  OpenStruct.new(:out => out.string, :err => err.string)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tree.rb-0.3.13 spec/spec_helper.rb