Sha256: c84dabfcee08d638d1aa5358ba162a4504bb1078db6285d452ab3628aa4a53a3

Contents?: true

Size: 682 Bytes

Versions: 10

Compression:

Stored size: 682 Bytes

Contents

require 'spec_helper'

require 'mspire/mzml/source_file'
require 'builder'

describe 'making a SourceFile' do
  it 'can be generated with params and a block' do
    source_file = Mspire::Mzml::SourceFile.new("someFileID", "filename.mzML", "/home/jtprince/tmp", params: ['MS:1000584'])

    params = source_file.params
    params.size.should == 1
    params.all? {|par| par.class == ::CV::Param }.should be_true
    b = Builder::XmlMarkup.new(:indent => 2)
    source_file.to_xml(b)
    xml = b.to_xml
    [/<sourceFile/, /id="some/, /name="filen/, /location="\/home/, /cvRef="MS"/].each do |regexp|
      xml.should match(regexp)
    end
  end

  it 'can be created from xml'
end


Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mspire-0.7.18 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.17 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.13 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.12 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.11 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.10 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.9 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.8 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.7 spec/mspire/mzml/source_file_spec.rb
mspire-0.7.6 spec/mspire/mzml/source_file_spec.rb