require File.join(Dir.pwd, 'spec', 'spec_helper') describe 'Experian::DataDictionary 0162' do context 'valid lookup' do it { expect(Experian::DataDictionary.lookup('0162', '15')).to eq('Less Than High School Diploma - Likely') } it { expect(Experian::DataDictionary.lookup('0162', '53')).to eq('Bachelor Degree - Extremely Likely') } it { expect(Experian::DataDictionary.lookup('0162', ' ')).to eq('Unknown') } end context 'invalid lookup' do it { expect(Experian::DataDictionary.lookup('0162', '9')).to eq('Unknown') } it { expect(Experian::DataDictionary.lookup('0162', 'A')).to eq('Unknown') } it { expect(Experian::DataDictionary.lookup('0162', 'R')).to eq('Unknown') } end end