spec/spec_helper.rb in kumogata-0.4.17 vs spec/spec_helper.rb in kumogata-0.4.18
- old
+ new
@@ -1,7 +1,8 @@
require 'kumogata'
require 'kumogata/argument_parser'
+require 'kumogata/config_parser'
require 'tempfile'
require 'time'
require 'timecop'
require 'uuidtools'
@@ -21,12 +22,12 @@
def self.mkpasswd(n)
'*' * n
end
end
-def tempfile(content, template_ext)
+def tempfile(content, template_ext = nil)
basename = "#{File.basename __FILE__}.#{$$}"
- basename = [basename, template_ext]
+ basename = [basename, template_ext] if template_ext
Tempfile.open(basename) do |f|
f << content
f.flush
f.rewind