Sha256: 7e6d4c83e70bc1a85382d798c606bacabcff01d5b8347804fd76e745e245fddf
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require 'spec_helper' require 'earth/air/flight_segment' describe FlightSegment do describe 'import', :data_miner => true do before do Earth.init :air, :load_data_miner => true, :skip_parent_associations => :true end it 'should import data' do FlightSegment.run_data_miner! end end describe "verify imported data", :sanity => true do it "should have all the data" do FlightSegment.all.count.should == 1_149_003 end it "should have year from 2009 to present" do FlightSegment.where("year IS NULL OR year < 2009 OR year > #{::Time.now.year}").count.should == 0 end it "should have origin airport in airports" do # FIXME TODO end it "should have destination airport in airports" do # FIXME TODO end it "should have origin country iso code in countries" do # FIXME TODO end it "should have destination country iso code in countries" do # FIXME TODO end it "should have airline name" do FlightSegment.where(:airline_name => nil).count.should == 0 end it "should have aircraft description" do FlightSegment.where(:aircraft_description => nil).count.should == 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
earth-0.11.19 | spec/earth/air/flight_segment_spec.rb |