Sha256: e6da058d36d11843df548f4e7957a909232292dcbe0e09f109d05e48f0170a21

Contents?: true

Size: 662 Bytes

Versions: 4

Compression:

Stored size: 662 Bytes

Contents

require 'spec_helper'
require 'earth/locality/egrid_country'

describe EgridCountry do
  describe 'import', :data_miner => true do
    before do
      Earth.init :locality, :load_data_miner => true
    end
    
    it 'should import data' do
      EgridCountry.delete_all if EgridCountry.table_exists?
      EgridCountry.run_data_miner!
    end
  end
  
  describe 'verify imported data', :sanity => true do
    it { EgridCountry.count.should == 1 }
    it { EgridCountry.us.loss_factor.should be_within(5e-6).of(0.06503) }
  end
  
  describe '.us' do
    it 'should return the US' do
      EgridCountry.us.should == EgridCountry.find('U.S.')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
earth-0.12.4 spec/earth/locality/egrid_country_spec.rb
earth-0.12.3 spec/earth/locality/egrid_country_spec.rb
earth-0.12.2 spec/earth/locality/egrid_country_spec.rb
earth-0.12.1 spec/earth/locality/egrid_country_spec.rb