this seems to have fixed a nuisance error within our unit-tests. Issue #57

This commit is contained in:
cktricky
2013-10-22 00:58:48 -04:00
parent d2bc7d740a
commit b7c3b04c74
+3 -2
View File
@@ -10,9 +10,10 @@ class Benefits < ActiveRecord::Base
make_backup(file, data_path, full_file_name) if backup == "true" make_backup(file, data_path, full_file_name) if backup == "true"
end end
def self.make_backup(file, data_path, full_file_name) def self.make_backup(*params)
if File.exists?(full_file_name)
system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}") system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}")
# FileUtils.cp "#{full_file_name}", "#{data_path}/bak#{Time.now.to_i}_#{file.original_filename}" end
end end
=begin =begin