public
Description: Syncs one directory to another (example: a git project to an svn repo)
Clone URL: git://github.com/technoweenie/duplikate.git
duplikate / spec / spec_helper.rb
100644 25 lines (21 sloc) 0.377 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'rubygems'
require 'spec'
require 'stringio'
 
begin
  require 'ruby-debug'
  Debugger.start
rescue LoadError
  # no debugging
end
 
def capturing_stdout
  saved_stdout = $stdout
  begin
    $stdout = StringIO.new
    yield
    $stdout.string
  ensure
    $stdout = saved_stdout
  end
end
 
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require 'duplikate'