Sha256: 79387eeaefe54f830b83936e194e7973ec2a87ba2d2d7c62995f0fd8afc5c38d

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

require 'spec_helper'
require 'earth/shipping/shipment_mode'

describe ShipmentMode do
  describe "Sanity check", :sanity => true do
    let(:total) { ShipmentMode.count }
    
    it { total.should == 3 }
    it { ShipmentMode.where('route_inefficiency_factor >= 1').count.should == total }
    it { ShipmentMode.where('transport_emission_factor > 0').count.should == total }
    
    # spot check
    it { ShipmentMode.first.route_inefficiency_factor.should == 1.1 }
    it { ShipmentMode.first.transport_emission_factor.should be_within(5e-7).of(0.001586) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-1.2.1 spec/earth/shipping/shipment_mode_spec.rb
earth-1.1.2 spec/earth/shipping/shipment_mode_spec.rb
earth-1.1.1 spec/earth/shipping/shipment_mode_spec.rb
earth-1.1.0 spec/earth/shipping/shipment_mode_spec.rb
earth-1.0.3 spec/earth/shipping/shipment_mode_spec.rb
earth-1.0.2 spec/earth/shipping/shipment_mode_spec.rb
earth-1.0.1 spec/earth/shipping/shipment_mode_spec.rb