Sha256: d6a24922b1063fb35c518189cb4cbb209ea28e564c0d7704636c6b6c811c7ab4
Contents?: true
Size: 728 Bytes
Versions: 7
Compression:
Stored size: 728 Bytes
Contents
require 'spec_helper' require "#{Earth::FACTORY_DIR}/automobile_activity_year_type_fuel" describe AutomobileActivityYearTypeFuel do let(:aaytf) { AutomobileActivityYearTypeFuel } describe '.latest' do it "returns all records from the latest year" do FactoryGirl.create :aaytf, :gas_car_2009 d = FactoryGirl.create :aaytf, :diesel_car_2010 g = FactoryGirl.create :aaytf, :gas_car_2010 aaytf.latest.should == [d, g] end end describe 'Sanity check', :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 end
Version data entries
7 entries across 7 versions & 1 rubygems