Sha256: fb74a41fa5a5f3d6a00de88ac26598a27837b321f51f6865e4a8c8289bf2c61b
Contents?: true
Size: 998 Bytes
Versions: 32
Compression:
Stored size: 998 Bytes
Contents
require 'spec_helper' describe BrDanfe::Uf do describe '#include?' do ufs = %w[ AC AL AP AM BA CE DF ES GO MA MT MS MG PA PB PR PE PI RJ RN RS RO RR SC SP SE TO ] context 'when uf is symbol' do ufs.each do |uf| it "returns true for uf #{uf}" do expect(BrDanfe::Uf.include?(uf.to_sym)).to be true end end end context 'when uf is string' do ufs.each do |uf| it "returns true for uf #{uf}" do expect(BrDanfe::Uf.include?(uf)).to be true end end end context 'when uf is not from Brazil' do it 'returns false' do expect(BrDanfe::Uf.include?('EX')).to be false end end context 'when uf is blank' do it 'returns false' do expect(BrDanfe::Uf.include?('')).to be false end end context 'when uf is nil' do it 'returns false' do expect(BrDanfe::Uf.include?(nil)).to be false end end end end
Version data entries
32 entries across 32 versions & 1 rubygems