Sha256: 5aa53d3681046fd709bba34d1db307bafbf382411c0a7c3fb0ab72892ce9d22e

Contents?: true

Size: 544 Bytes

Versions: 7

Compression:

Stored size: 544 Bytes

Contents

require 'spec_helper'
require 'earth/locality/egrid_region'

describe EgridRegion do
  describe 'Sanity check', :sanity => true do
    it { EgridRegion.count.should == 5 }
    it { EgridRegion.where("loss_factor > 0").count.should == EgridRegion.count }
    
    # spot check
    it { EgridRegion.first.loss_factor.should be_within(5e-6).of(0.05840) }
    
    describe '.fallback' do
      it { EgridRegion.fallback.name.should == 'fallback' }
      it { EgridRegion.fallback.loss_factor.should be_within(5e-6).of(0.06503) }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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