spec/ziptz_spec.rb in ziptz-3.0.9 vs spec/ziptz_spec.rb in ziptz-3.0.10

- old
+ new

@@ -104,6 +104,20 @@ it 'returns empty array for unknown time zones' do expect(ziptz.zips('Glark')).to be_empty end end end + + describe '#instance' do + context 'when given a 5 digit zip code' do + it 'matches the behavior of Ziptz.new' do + expect(Ziptz.instance.time_zone_name('97034')).to eq ziptz.time_zone_name('97034') + end + end + + context 'when called twice' do + it 'returns identical instances' do + expect(Ziptz.instance.object_id).to eq Ziptz.instance.object_id + end + end + end end