Sha256: 4048bc5321f6b8e3ff176fce029e5e5eb16434106289df57bb7501e8c390edd0

Contents?: true

Size: 611 Bytes

Versions: 7

Compression:

Stored size: 611 Bytes

Contents

require 'spec_helper'
require 'earth/rail/country_rail_class'

describe CountryRailClass do
  describe 'Sanity check', :sanity => true do
    it { CountryRailClass.count.should == 4 }
    
    # spot check
    let(:us_heavy) { CountryRailClass.find 'US heavy' }
    it { us_heavy.speed.should be_within(5e-3).of(32.7) }
    it { us_heavy.trip_distance.should be_within(5e-3).of(7.7) }
    it { us_heavy.electricity_intensity.should be_within(5e-5).of(0.1585) }
    it { us_heavy.diesel_intensity.should be_within(5e-5).of(0) }
    it { us_heavy.co2_emission_factor.should be_within(5e-5).of(0.1024) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-1.2.1 spec/earth/rail/country_rail_class_spec.rb
earth-1.1.2 spec/earth/rail/country_rail_class_spec.rb
earth-1.1.1 spec/earth/rail/country_rail_class_spec.rb
earth-1.1.0 spec/earth/rail/country_rail_class_spec.rb
earth-1.0.3 spec/earth/rail/country_rail_class_spec.rb
earth-1.0.2 spec/earth/rail/country_rail_class_spec.rb
earth-1.0.1 spec/earth/rail/country_rail_class_spec.rb