require File.join(Dir.pwd, 'spec', 'spec_helper') describe 'Experian::DataDictionary 0118' do context 'valid lookup' do it { expect( Experian::DataDictionary.lookup('0118','S') ).to eq('Single Family') } it { expect( Experian::DataDictionary.lookup('0118','A') ).to eq('Multi-Family & Condominiums') } it { expect( Experian::DataDictionary.lookup('0118','M') ).to eq('Marginal Multi-Family') } it { expect( Experian::DataDictionary.lookup('0118','P') ).to eq('Post Office Box') } it { expect( Experian::DataDictionary.lookup('0118','U') ).to eq('Unknown') } it { expect( Experian::DataDictionary.lookup('0118',' ') ).to eq('Unknown') } end context 'invalid lookup' do it { expect( Experian::DataDictionary.lookup('0118','F') ).to be_nil } it { expect( Experian::DataDictionary.lookup('0118','HE') ).to be_nil } it { expect( Experian::DataDictionary.lookup('0118','GG') ).to be_nil } it { expect( Experian::DataDictionary.lookup('0118','DOG') ).to be_nil } end end