require File.join(Dir.pwd, 'spec', 'spec_helper') describe 'Experian::DataDictionary g2001' do context 'valid lookup' do it { expect(Experian::DataDictionary.lookup('g2001', '0701')).to eq(70.1) } it { expect(Experian::DataDictionary.lookup('g2001', '0962')).to eq(96.2) } it { expect(Experian::DataDictionary.lookup('g2001', '1000')).to eq(100.0) } it { expect(Experian::DataDictionary.lookup('g2001', ' ')).to eq('Unknown') } end context 'invalid lookup' do it { expect(Experian::DataDictionary.lookup('g2001', 'P')).to eq('Unknown') } it { expect(Experian::DataDictionary.lookup('g2001', '0')).to eq('Unknown') } it { expect(Experian::DataDictionary.lookup('g2001', '14')).to eq('Unknown') } end end