#helper method for output tests def capture_log origin = $stdout $stdout = StringIO.new yield $stdout = origin end #helper method for clearing temp directory def clear_tmp Dir.chdir $default[:dir] FileUtils.rm_rf 'tmp' if File.directory? 'tmp' Dir.mkdir 'tmp' Dir.chdir 'tmp' end