Sha256: cdbfbd85c159070ad3001b5f8ac51c4bef31eeff2d2ea15d57261031e93d7e7c

Contents?: true

Size: 833 Bytes

Versions: 2

Compression:

Stored size: 833 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

RSpec.describe GovKit::CA::PostalCode::Strategy::CBCCa do
  describe '#electoral_districts', :broken => true do
    it 'should return the electoral districts within a postal code' do
      EXPECTATIONS[:cbc_ca].each do |postal_code,electoral_districts|
        expect(GovKit::CA::PostalCode::Strategy::CBCCa.new(postal_code).electoral_districts).to eq(electoral_districts)
      end
    end

    it 'should return false if a postal code contains no electoral districts' do
      expect(GovKit::CA::PostalCode::Strategy::CBCCa.new('H0H0H0').electoral_districts).to eq(false)
    end

    it 'should return false if a postal code does not exist' do
      expect(GovKit::CA::PostalCode::Strategy::CBCCa.new('X1B1B1').electoral_districts).to eq(false)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
govkit-ca-0.0.14 spec/cbc_ca_spec.rb
govkit-ca-0.0.13 spec/cbc_ca_spec.rb