Sha256: bbe0c2c696e944174294d6853fa8360743a9853436c4d2c0935fc1cf96d551ee
Contents?: true
Size: 958 Bytes
Versions: 6
Compression:
Stored size: 958 Bytes
Contents
require 'bigbio' # FASTA support Given /^a MAF source file "(.*?)"$/ do |src| @src_f = $test_data + src @src_f.exist?.should be_true end Given /^MAF data:$/ do |string| @src_f = Tempfile.new(['rspec', '.maf']) @src_f.write(string) @src_f.close end When /^I select FASTA output$/ do @dst = Tempfile.new(['cuke', ".#{@out_fmt.to_s}"]) @dst.close @writer = FastaWriter.new(@dst.path) end When /^process the file$/ do @parser.each_block do |block| block.each_raw_seq do |seq| seq.write_fasta(@writer) end end @writer.close end Then /^the output should match "(.*?)"$/ do |ref| ref_p = $test_data + ref ref_p.exist?.should be_true #system("diff #{ref} #{@dst.path} >/dev/null 2>&1").should be_true File.read(@dst.path).should == File.read(ref_p) end Then /^the output should be:$/ do |string| File.read(@dst.path).should == string end After do if @dst @dst.close @dst.unlink end end
Version data entries
6 entries across 6 versions & 1 rubygems