Sha256: 2dbfda32cf877f2309aa7f0909a7263f971657a302d3afe89136524283a025fe
Contents?: true
Size: 827 Bytes
Versions: 10
Compression:
Stored size: 827 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ms/msrun' describe 'a scan' do before do @scan = Ms::Scan.new @scan.precursor = Ms::Precursor.new @scan.spectrum = Ms::Spectrum.new([[1,2,3,4], [2,4,4,2]]) end it 'can determine if its +1 or not' do # these have not been checked for accuracy, just sanity reply = [0.1,2.5, 3.5, 5].map do |prec_mz| @scan.precursor.mz = prec_mz @scan.plus1?(-0.1) end reply.all? {|v| v == true }.ok reply = [0.1,2.5, 3.5, 5].map do |prec_mz| @scan.precursor.mz = prec_mz @scan.plus1?(1.0) end reply.all? {|v| v == false }.ok reply = [0.1,2.5, 3.5, 5].map do |prec_mz| @scan.precursor.mz = prec_mz @scan.plus1?(0.5) end reply.enums [false, false, true, true] end end
Version data entries
10 entries across 10 versions & 1 rubygems