Sha256: 0fc16c6dcd7149b7a866acac70e084dbd3e920203cf9af2bc4e097e8c2feb588

Contents?: true

Size: 799 Bytes

Versions: 7

Compression:

Stored size: 799 Bytes

Contents

require 'spec_helper'
require 'earth/locality/petroleum_administration_for_defense_district'

describe PetroleumAdministrationForDefenseDistrict do
  let(:padd) { PetroleumAdministrationForDefenseDistrict }
  
  describe '#name' do
    it 'describes a PADD that is a district' do 
      test = padd.new(:district_code => 1, :district_name => 'East Coast')
      test.name.should == 'PAD District 1 (East Coast)'
    end
    it 'describes a PADD that is a subdistric' do
      test = padd.new(:district_code => 1, :district_name => 'East Coast', :subdistrict_code => 'A', :subdistrict_name => 'New England')
      test.name.should == 'PAD District 1 (East Coast) Subdistrict 1A (New England)'
    end
  end
  
  describe 'Sanity check', :sanity => true do
    it { padd.count.should == 7 }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-1.2.1 spec/earth/locality/padd_spec.rb
earth-1.1.2 spec/earth/locality/padd_spec.rb
earth-1.1.1 spec/earth/locality/padd_spec.rb
earth-1.1.0 spec/earth/locality/padd_spec.rb
earth-1.0.3 spec/earth/locality/padd_spec.rb
earth-1.0.2 spec/earth/locality/padd_spec.rb
earth-1.0.1 spec/earth/locality/padd_spec.rb