Sha256: 92a9337f441198d2545f311d24252d533100951868aea04188f74ca35b85b06c

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

require 'spec_helper'
require 'earth/rail/country_rail_traction_class'

describe CountryRailTractionClass do
  describe 'Sanity check', :sanity => true do
    it { CountryRailTractionClass.count.should == 125 }
    
    # spot check
    let(:gb_elec_highspeed) { CountryRailTractionClass.find 'GB electric highspeed' }
    it { gb_elec_highspeed.electricity_intensity.should be_within(5e-5).of(0.07) }
    it { gb_elec_highspeed.diesel_intensity.should be_within(5e-6).of(0) }
    it { gb_elec_highspeed.co2_emission_factor.should be_within(5e-6).of(0.04153) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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