Sha256: 88ae2471031c6969b9f1916acce0ec41addb397bff027f0a07c5db57c504fcfa

Contents?: true

Size: 382 Bytes

Versions: 2

Compression:

Stored size: 382 Bytes

Contents

require 'spec_helper'

require 'ms/molecular_formula'

describe MS::MolecularFormula do

  it 'can be initialized with a String or Hash' do
    data = {h: 22, c: 12, n: 1, o: 3, s: 2}
    mf = MS::MolecularFormula.new "H22BeC12N1O3S2Li2"
    mf.should == {:h=>22, :be=>1, :c=>12, :n=>1, :o=>3, :s=>2, :li=>2}
    mf = MS::MolecularFormula.new(data)
    mf.should == data
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mspire-0.6.26 spec/ms/molecular_formula_spec.rb
mspire-0.6.25 spec/ms/molecular_formula_spec.rb