Module: FileHelper::TestDirs::Remove

Included in:
FileHelper::TestDirs
Defined in:
lib/file_spec/file_helpers/test_dirs.rb

Instance Method Summary collapse

Instance Method Details

#remove_dir(dir) ⇒ Object



49
50
51
# File 'lib/file_spec/file_helpers/test_dirs.rb', line 49

def remove_dir dir
  FileUtils.rm_rf dir if File.directory? dir
end

#remove_test_dirObject



53
54
55
# File 'lib/file_spec/file_helpers/test_dirs.rb', line 53

def remove_test_dir
  remove_dir test_dir
end

#remove_test_dirsObject



57
58
59
# File 'lib/file_spec/file_helpers/test_dirs.rb', line 57

def remove_test_dirs
  test_dirs.each{|dir| remove_dir dir}
end