Sha256: 856a3a9c9d752453bf4f7d5a6279d1388c29493d06740b5e4c4be09ca125067a
Contents?: true
Size: 924 Bytes
Versions: 5
Compression:
Stored size: 924 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Pupa::ContactDetailList do let :object do Pupa::ContactDetailList.new([ { type: 'address', value: 'first', }, { type: 'address', value: 'second', }, { type: 'email', value: 'first', }, { type: 'email', value: 'second', }, ]) end describe '#address' do it 'should return the first postal address' do object.address.should == 'first' end it 'should return nil if no postal addresses' do Pupa::ContactDetailList.new.address.should == nil end end describe '#email' do it 'should return the first email address' do object.email.should == 'first' end it 'should return nil if no email addresses' do Pupa::ContactDetailList.new.email.should == nil end end end
Version data entries
5 entries across 5 versions & 1 rubygems