Sha256: 472e528f8ee88b55b373c773006cd20dc66b8572a100d18f815a782f311f5954
Contents?: true
Size: 720 Bytes
Versions: 5
Compression:
Stored size: 720 Bytes
Contents
require 'spec_helper' require 'earth/automobile/automobile_year' describe AutomobileYear do before :all do Earth.init :automobile, :load_data_miner => true end describe 'import', :data_miner => true do it 'should import data' do AutomobileYear.run_data_miner! AutomobileYear.count.should == AutomobileYear.connection.select_value("SELECT COUNT(DISTINCT year) FROM #{AutomobileMakeModelYearVariant.quoted_table_name}") end end describe ".weighting(year)" do (1985..2012).each do |year| it "returns a weighting between 0 and 1 for #{year}" do AutomobileYear.weighting(year).should > 0.0 and AutomobileYear.weighting(year).should < 1.0 end end end end
Version data entries
5 entries across 5 versions & 1 rubygems