lib/scaffolder/test/helpers.rb in scaffolder-test-helpers-0.2.1 vs lib/scaffolder/test/helpers.rb in scaffolder-test-helpers-0.2.2
- old
+ new
@@ -10,18 +10,18 @@
def generate_scaffold_files(entries)
[write_scaffold_file(entries),write_sequence_file(entries)]
end
- def write_scaffold_file(entries,file = Tempfile.new("scaffold").path)
- File.open(file,'w') do |tmp|
+ def write_scaffold_file(entries,file = Tempfile.new("scaffold"))
+ File.open(file.path,'w') do |tmp|
tmp.print(YAML.dump(entries.map{|e| e.to_hash }))
end
file
end
- def write_sequence_file(entries,file = Tempfile.new("sequence").path)
- File.open(file,'w') do |tmp|
+ def write_sequence_file(entries,file = Tempfile.new("sequence"))
+ File.open(file.path,'w') do |tmp|
entries.each do |entry|
tmp.puts(entry.to_fasta) if entry.respond_to? :to_fasta
end
end
file