Sha256: 9b8cebbefc5370ef29191735d2d197459dcf87901e41eb46e388a851cb918a63

Contents?: true

Size: 745 Bytes

Versions: 5

Compression:

Stored size: 745 Bytes

Contents

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

describe Industry do
  before :all do
    Industry.auto_upgrade!
  end
  
  describe "when importing data", :data_miner => true do
    before do
      require 'earth/industry/industry/data_miner'
    end
    
    it "imports all naics codes" do
      Industry.run_data_miner!
      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

5 entries across 5 versions & 1 rubygems

Version Path
earth-0.11.18 spec/earth/industry/industry_spec.rb
earth-0.11.17 spec/earth/industry/industry_spec.rb
earth-0.11.16 spec/earth/industry/industry_spec.rb
earth-0.11.15 spec/earth/industry/industry_spec.rb
earth-0.11.14 spec/earth/industry/industry_spec.rb