Sha256: 2928b2b10d00147ec57183b51885a30fd8978bdad982dcfc306e925970502a03

Contents?: true

Size: 838 Bytes

Versions: 3

Compression:

Stored size: 838 Bytes

Contents

require 'spec_helper'
require 'earth/industry/industry'

describe Industry do
  describe "when importing data", :data_miner => true do
    before do
      Earth.init :industry, :load_data_miner => true, :skip_parent_associations => :true
    end
    
    it "imports all naics codes" do
      Industry.run_data_miner!
    end
  end
  
  describe "verify imported data", :sanity => true do
    it "should have all the data" do
      Industry.count.should == 2341
    end
  end
  
  describe "methods" do
    it "knows whether it's a trade industry (wholesale or retail trade)" do
      Industry.find('42331').trade_industry?.should == true
      Industry.find('445110').trade_industry?.should == true
      Industry.find('4539').trade_industry?.should == true
      Industry.find('33291').trade_industry?.should == false
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-0.12.0 spec/earth/industry/industry_spec.rb
earth-0.11.20 spec/earth/industry/industry_spec.rb
earth-0.11.19 spec/earth/industry/industry_spec.rb