Sha256: d2cb8d7de9dc5452601f51db0972b750b197fb6d28c65e57fbe2bd1a3affe091
Contents?: true
Size: 1.11 KB
Versions: 7
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' require 'earth/industry/naics_2002' describe Naics2002 do describe "Sanity check", :sanity => true do it "should have all the data" do Naics2002.count.should == 2341 end it "can be translated to a SIC 1987 code" do { '111140' => %w{ 0111 }, '111150' => %w{ 0115 0119 }, '111920' => %w{ 0131 }, '238910' => %w{ 1081 1241 1389 1481 1629 1711 1794 1795 1799 7353 }, '488119' => %w{ 4581 4959 7997 } }.each do |naics, sics| Naics2002.find(naics).sic_1987.map(&:code).sort.should == sics end end it "can be translated to a NAICS 2007 code" do { '111150' => %w{ 111150 }, '111219' => %w{ 111211 111219 } }.each do |naics_2002, naics_2007| Naics2002.find(naics_2002).naics_2007.map(&:code).sort.should == naics_2007 end end it "can be translated to an industry" do { '111150' => '111150', '111219' => '111219' }.each do |naics, industry| Naics2002.find(naics).industry.naics_code.should == industry end end end end
Version data entries
7 entries across 7 versions & 1 rubygems