Sha256: fb33e5bae47796bc25d8f652dd7a5d36f0b56862eeee7d69a9f8d398737f805e

Contents?: true

Size: 680 Bytes

Versions: 6

Compression:

Stored size: 680 Bytes

Contents

require_relative '../../spec_helper'

module Barometer::Query
  describe Format::Icao do
    describe '.geo' do
      specify { expect( Format::Icao.geo(nil) ).to be_nil }
      specify { expect( Format::Icao.geo('KSFO') ).to eq({country_code: 'US'}) }
      specify { expect( Format::Icao.geo('CYYC') ).to eq({country_code: 'CA'}) }
      specify { expect( Format::Icao.geo('ETAA') ).to eq({country_code: 'DE'}) }
    end

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

      it 'recognizes non-valid format' do
        expect( Format::Icao.is?('invalid') ).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/icao_spec.rb
barometer-0.9.6 spec/query/formats/icao_spec.rb
barometer-0.9.5 spec/query/formats/icao_spec.rb
barometer-0.9.4 spec/query/formats/icao_spec.rb
barometer-0.9.3 spec/query/formats/icao_spec.rb
barometer-0.9.2 spec/query/formats/icao_spec.rb