Sha256: 4923dfeaedb1562eb8d99a9288f976cdffcb4a9175d783b1ce0a77d1bbcc8ac0

Contents?: true

Size: 512 Bytes

Versions: 7

Compression:

Stored size: 512 Bytes

Contents

require 'spec_helper'
require 'earth/residence/residence_fuel_type'

describe ResidenceFuelType do
  describe '.[](fuel)' do
    it "finds a fuel by name" do
      oil = ResidenceFuelType.find_or_create_by_name('fuel oil')
      ResidenceFuelType['Fuel Oil'].should == oil
    end
  end
  
  describe "Sanity check", :sanity => true do
    it { ResidenceFuelType.count.should == 7 }
    
    # spot check
    it { ResidenceFuelType.find('fuel oil').emission_factor.should be_within(5e-6).of(2.69729) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-1.2.1 spec/earth/residence/residence_fuel_type_spec.rb
earth-1.1.2 spec/earth/residence/residence_fuel_type_spec.rb
earth-1.1.1 spec/earth/residence/residence_fuel_type_spec.rb
earth-1.1.0 spec/earth/residence/residence_fuel_type_spec.rb
earth-1.0.3 spec/earth/residence/residence_fuel_type_spec.rb
earth-1.0.2 spec/earth/residence/residence_fuel_type_spec.rb
earth-1.0.1 spec/earth/residence/residence_fuel_type_spec.rb