Sha256: 969a37fe31987f21a0fdcef9b1ca273b08481ca287336fe950ff9f5d48a14bab
Contents?: true
Size: 637 Bytes
Versions: 20
Compression:
Stored size: 637 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Pupa::IdentifierList do let :object do Pupa::IdentifierList.new([ { identifier: '123456789', scheme: 'DUNS', }, { identifier: 'US0123456789', scheme: 'ISIN', }, ]) end describe '#find_by_scheme' do it 'should return the first identifier matching the scheme' do object.find_by_scheme('ISIN').should == 'US0123456789' end it 'should return nil if no identifier matches the scheme' do Pupa::IdentifierList.new.find_by_scheme('ISIN').should == nil end end end
Version data entries
20 entries across 20 versions & 1 rubygems