Sha256: 698ad1229d29776a0169bbd8f057c7072c735f8786770766ec3a6daa23ca1a4e

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

require 'helper'

class TestCsi < Test::Unit::TestCase
  should "find a NAICS classification for 1123" do
    assert_equal CSI::lookup_naics(1123), 'Poultry and Egg Production'
  end

  should "not find a NAICS classification for 0000" do
    assert_equal CSI::lookup_naics(0000), nil
  end

  should "raise an error finding a NAICS classification for nil" do
    assert_raise TypeError do
      CSI::lookup_naics(nil)
    end
  end

  should "raise an error finding a NAICS classification for strings" do
    assert_raise TypeError do
      CSI::lookup_naics("1123")
    end
  end

  should "find a SIC classification for 8041" do
    assert_equal CSI::lookup_sic(8041), 'Offices and Clinics of Chiropractors'
  end

  should "not find a SIC classification for 0000" do
    assert_equal CSI::lookup_sic(0000), nil
  end

  should "raise an error finding a SIC classification for nil" do
    assert_raise TypeError do
      CSI::lookup_sic(nil)
    end
  end

  should "raise an error finding a SIC classification for strings" do
    assert_raise TypeError do
      CSI::lookup_sic("8041")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csi-0.2.0 test/test_csi.rb