spec/postal_code_spec.rb in govkit-ca-0.0.4 vs spec/postal_code_spec.rb in govkit-ca-0.0.5
- old
+ new
@@ -31,11 +31,12 @@
describe '#find_electoral_districts_by_postal_code' do
before :all do
{ 'ElectionsCa' => 'elections_ca',
'CBCCa' => 'cbc_ca',
'NDPCa' => 'ndp_ca',
- 'GreenPartyCa' => 'greenparty_ca',
+ # GreenPartyCa is broken.
+ #'GreenPartyCa' => 'greenparty_ca',
}.each do |const,path|
%w(A1A1A1 K0A1K0 H0H0H0).each do |postal_code|
strategy = GovKit::CA::PostalCode::Strategy.const_get(const).new(postal_code)
unless FakeWeb.allow_net_connect?
FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path(path, "#{postal_code}.response")
@@ -44,10 +45,10 @@
end
end
it 'should return the electoral districts within a postal code' do
{ 'A1A1A1' => [10007],
- 'K0A1K0' => [35025, 35052, 35063, 35064],
+ 'K0A1K0' => [35012, 35025, 35040, 35052],
}.each do |postal_code,electoral_districts|
subject.find_electoral_districts_by_postal_code(postal_code).should == electoral_districts
end
end