spec/elections_ca_spec.rb in govkit-ca-0.0.12 vs spec/elections_ca_spec.rb in govkit-ca-0.0.13

- old
+ new

@@ -1,12 +1,10 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper') RSpec.describe GovKit::CA::PostalCode::Strategy::ElectionsCa do describe '#electoral_districts' do it 'should return the electoral districts within a postal code' do - { 'G0C2Y0' => [24019], - 'T5S2B9' => [48015], - }.each do |postal_code,electoral_districts| + EXPECTATIONS[:elections_ca].each do |postal_code,electoral_districts| expect(GovKit::CA::PostalCode::Strategy::ElectionsCa.new(postal_code).electoral_districts).to eq(electoral_districts) end end it 'should (unfortunately) return false if a postal code contains multiple electoral districts' do