Sha256: 2bda26d3b2db837731b196ec1cbe9ddb722ff34cc7b4663acca5bc799ccb13ee
Contents?: true
Size: 775 Bytes
Versions: 4
Compression:
Stored size: 775 Bytes
Contents
When /^open a new MAF writer$/ do @dst = Tempfile.new(["cuke", ".maf"]) @writer = Bio::MAF::Writer.new(@dst) end When /^write the header from the original MAF file$/ do @writer.write_header(@parser.header) end When /^write all the parsed blocks$/ do @writer.write_blocks(@parser.parse_blocks) end RSpec::Matchers.define :match_except_ws do |expected| match do |actual| system("diff --ignore-space-change --brief #{expected} #{actual} >/dev/null 2>&1") end failure_message_for_should do |actual| msg = "File contents did not match. Diff:\n" msg << `diff --unified --ignore-space-change #{expected} #{actual}` end end Then /^the output should match, except whitespace, "(.+)"$/ do |ref| @dst.path.should match_except_ws($test_data + ref) end
Version data entries
4 entries across 4 versions & 1 rubygems