Sha256: ff071259239d4d2bfa90338dd96aba2d10d787f60c1f3d48bd835ffa0ff3822d

Contents?: true

Size: 797 Bytes

Versions: 2

Compression:

Stored size: 797 Bytes

Contents

require 'helper'

class TestLicensee < Minitest::Test
  should "know the licenses" do
    assert_equal Array, Licensee.licenses.class
    assert_equal 15, Licensee.licenses.size
    assert_equal 24, Licensee.licenses(:hidden => true).size
    assert_equal Licensee::License, Licensee.licenses.first.class
  end

  should "detect a project's license" do
    assert_equal "mit", Licensee.license(fixture_path("licenses.git")).key
  end

  context "confidence threshold" do
    should "return the confidence threshold" do
      assert_equal 90, Licensee.confidence_threshold
    end

    should "let the user override the confidence threshold" do
      Licensee.confidence_threshold = 50
      assert_equal 50, Licensee.confidence_threshold
      Licensee.confidence_threshold = 90
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
licensee-6.0.0 test/test_licensee.rb
licensee-6.0.0b1 test/test_licensee.rb