Sha256: 9c199a7fbc6a43715aafd87b8a7e5d43403072f8ab9cd380ed2c2e1ae3851612

Contents?: true

Size: 798 Bytes

Versions: 4

Compression:

Stored size: 798 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 { Industry.count.should == 2341 }
  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

4 entries across 4 versions & 1 rubygems

Version Path
earth-0.12.4 spec/earth/industry/industry_spec.rb
earth-0.12.3 spec/earth/industry/industry_spec.rb
earth-0.12.2 spec/earth/industry/industry_spec.rb
earth-0.12.1 spec/earth/industry/industry_spec.rb