spec/spec_helper.rb in optimus-ep-0.6.0 vs spec/spec_helper.rb in optimus-ep-0.6.5
- old
+ new
@@ -10,10 +10,11 @@
SAMPLE_DIR = File.join(File.dirname(__FILE__), 'samples')
LOG_FILE = File.join(SAMPLE_DIR, 'optimus_log.txt')
EXCEL_FILE = File.join(SAMPLE_DIR, 'excel_tsv.txt')
BAD_EXCEL_FILE = File.join(SAMPLE_DIR, 'bad_excel_tsv.txt')
EPRIME_FILE = File.join(SAMPLE_DIR, 'eprime_tsv.txt')
+ RAW_TSV_FILE = File.join(SAMPLE_DIR, 'raw_tsv.txt')
UNKNOWN_FILE = File.join(SAMPLE_DIR, 'unknown_type.txt')
UNREADABLE_FILE = File.join(SAMPLE_DIR, 'unreadable_file')
CORRUPT_LOG_FILE = File.join(SAMPLE_DIR, 'corrupt_log_file.txt')
@@ -99,8 +100,14 @@
CONST_EXPRS[sym][0]
end
def ev(sym)
CONST_EXPRS[sym][1].call.to_s
+ end
+
+ def time
+ t1 = Time.now.to_f
+ yield
+ return Time.now.to_f - t1
end
end
\ No newline at end of file