Sha256: be790ed59082686c8ebb2a5ef37adee14e06da611a7c9bbb0dcb767d946bc32b

Contents?: true

Size: 583 Bytes

Versions: 6

Compression:

Stored size: 583 Bytes

Contents

require_relative '../../spec_helper'

module Barometer::Query
  describe Format::ShortZipcode do
    describe '.geo' do
      specify { expect( Format::ShortZipcode.geo(nil) ).to eq({country_code: 'US'}) }
      specify { expect( Format::ShortZipcode.geo('ignored') ).to eq({country_code: 'US'}) }
    end

    describe '.is?' do
      it 'recognizes a valid format' do
        expect( Format::ShortZipcode.is?('90210') ).to be_true
      end

      it 'recognizes non-valid format' do
        expect( Format::ShortZipcode.is?('90210-5555') ).to be_false
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
barometer-0.9.7 spec/query/formats/short_zipcode_spec.rb
barometer-0.9.6 spec/query/formats/short_zipcode_spec.rb
barometer-0.9.5 spec/query/formats/short_zipcode_spec.rb
barometer-0.9.4 spec/query/formats/short_zipcode_spec.rb
barometer-0.9.3 spec/query/formats/short_zipcode_spec.rb
barometer-0.9.2 spec/query/formats/short_zipcode_spec.rb