Sha256: 848c2774fc57a20edbb695fc4b4958211cde441c84ea8f8a6de4b26ac9dac0c4
Contents?: true
Size: 906 Bytes
Versions: 3
Compression:
Stored size: 906 Bytes
Contents
$:.unshift(File.dirname(__FILE__) + '/../lib') require 'test/unit' require 'rubygems' require 'fileutils' class Test::Unit::TestCase def input_file File.dirname(__FILE__) + '/input_file' end def output_dir File.dirname(__FILE__) + '/outputs' end def default_image File.dirname(__FILE__) + '/test.jpg' end def setup FileUtils.mkdir_p output_dir end def teardown # Delete test input file File.delete(input_file) if File.file?(input_file) # Clean outputs directory delete_content output_dir end protected # Recursively delete folder content def delete_content(dir) Dir.foreach(dir) do |f| path = dir + "/" + f if f == '.' or f == '..' then next elsif File.directory?(path) then FileUtils.rm_rf(path) else FileUtils.rm(path) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rdvd-slideshow-0.0.2 | test/helper.rb |
rdvd-slideshow-0.0.3 | test/helper.rb |
rdvd-slideshow-0.0.1 | test/helper.rb |