Sha256: f6a9b705506df653e3577adeaf478798d2d8e4506ba815d09a2e0658c32b84cc

Contents?: true

Size: 874 Bytes

Versions: 2

Compression:

Stored size: 874 Bytes

Contents

require File.expand_path( File.dirname(__FILE__) + '/../spec_helper' )


describe 'ms_to_lmat.rb' do

  before(:all) do
    @progname = 'ms_to_lmat.rb'
    @mzxml = Tfiles + "/opd1/twenty_scans.mzXML"
    @ans_lmata = Tfiles + "/opd1/twenty_scans_answ.lmata"
    @ans_lmat = Tfiles + "/opd1/twenty_scans_answ.lmat"
  end

  it_should_behave_like "a cmdline program"

  it 'creates the correct lmata (ascii) file' do
    cmd = "#{@cmd} #{@mzxml} --ascii"   
    `#{cmd}`
    newfile = @mzxml.sub(".mzXML", ".lmata")
    newfile.should exist
    IO.read(newfile).should == IO.read(@ans_lmata)
    File.unlink(newfile)
  end


  it 'creates the correct lmat (binary) file' do
    cmd = "#{@cmd} #{@mzxml}"   
    `#{cmd}`
    newfile = @mzxml.sub(".mzXML", ".lmat")
    newfile.should exist
    IO.read(newfile).should == IO.read(@ans_lmat)
    File.unlink(newfile)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mspire-0.3.0 specs/bin/ms_to_lmat_spec.rb
mspire-0.3.1 specs/bin/ms_to_lmat_spec.rb