Sha256: dd54654f84c493f9dfc77f586aaaf5697e53e39de8aaaa643642dfd85e1e76a6

Contents?: true

Size: 707 Bytes

Versions: 3

Compression:

Stored size: 707 Bytes

Contents

require 'spec_helper'
require 'earth/automobile/automobile_activity_year_type_fuel'

describe AutomobileActivityYearTypeFuel do
  before :all do
    Earth.init :automobile, :load_data_miner => true
    require 'earth/acronyms'
  end
  
  describe 'import', :data_miner => true do
    it 'should import data' do
      AAYTF.run_data_miner!
    end
  end
  
  describe 'verify', :sanity => true do
    it { AAYTF.count.should == 120 }
    it { AAYTF.where(:distance => nil).count.should == 0 }
    it { AAYTF.where("fuel_family != 'alternative' AND fuel_consumption IS NULL").count.should == 0 }
  end
  
  describe '.latest' do
    it { AAYTF.latest.should == AAYTF.where(:activity_year => 2009) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-0.12.4 spec/earth/automobile/automobile_activity_year_type_fuel_spec.rb
earth-0.12.3 spec/earth/automobile/automobile_activity_year_type_fuel_spec.rb
earth-0.12.2 spec/earth/automobile/automobile_activity_year_type_fuel_spec.rb