Sha256: 57cb342786170a92d2f0fd8b21c28c5c8ffedccfaa31e191dfc0681c26fed3a5
Contents?: true
Size: 398 Bytes
Versions: 3
Compression:
Stored size: 398 Bytes
Contents
require 'spec_helper' require 'mspire/molecular_formula' describe Mspire::MolecularFormula do it 'can be initialized with a String or Hash' do data = {h: 22, c: 12, n: 1, o: 3, s: 2} mf = Mspire::MolecularFormula.new "H22BeC12N1O3S2Li2" mf.should == {:h=>22, :be=>1, :c=>12, :n=>1, :o=>3, :s=>2, :li=>2} mf = Mspire::MolecularFormula.new(data) mf.should == data end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mspire-0.7.4 | spec/mspire/molecular_formula_spec.rb |
mspire-0.7.3 | spec/mspire/molecular_formula_spec.rb |
mspire-0.7.2 | spec/mspire/molecular_formula_spec.rb |