Sha256: 83fbf7de4357732b5f4b91a07c8a3a2905e52fd20192fca36f1d165e74720256
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
require 'spec_helper' require 'earth/automobile/automobile_make_year_fleet' describe AutomobileMakeYearFleet do describe 'import', :data_miner => true do before do Earth.init :automobile, :load_data_miner => true, :skip_parent_associations => :true end it 'should import data' do AutomobileMakeYearFleet.run_data_miner! end end describe 'verify imported data', :sanity => true do it 'should have all the data' do AutomobileMakeYearFleet.all.count.should == 1349 end it 'should have year from 1978 to 2011' do AutomobileMakeYearFleet.where('year IS NULL OR year < 1978 OR year > 2011').count.should == 0 end it 'should have volume greater than zero' do AutomobileMakeYearFleet.where('volume IS NULL OR volume <= 0').count.should == 0 end it 'should have fuel efficiency greater than zero' do AutomobileMakeYearFleet.where('fuel_efficiency IS NULL OR fuel_efficiency <= 0').count.should == 0 end it 'should have fuel efficiency units of kilometres per litre' do AutomobileMakeYearFleet.where("fuel_efficiency_units IS NULL OR fuel_efficiency_units != 'kilometres_per_litre'").count.should == 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
earth-0.11.19 | spec/earth/automobile/automobile_make_year_fleet_spec.rb |