Sha256: 5ccf7e200d4099be5092843cb81a370baaed04201a6f3574f92b130af7882f87

Contents?: true

Size: 522 Bytes

Versions: 9

Compression:

Stored size: 522 Bytes

Contents

require 'helper'

class TestLicenseePackageInfo < Minitest::Test
  context 'license filename scoring' do
    EXPECTATIONS = {
      'licensee.gemspec' => 1.0,
      'package.json'     => 1.0,
      'bower.json'       => 0.75,
      'README.md'        => 0.0
    }.freeze

    EXPECTATIONS.each do |filename, expected|
      should "score a license named `#{filename}` as `#{expected}`" do
        score = Licensee::Project::PackageInfo.name_score(filename)
        assert_equal expected, score
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
licensee-8.5.0 test/licensee/project_files/test_package_info.rb
licensee-8.4.0 test/licensee/project_files/test_package_info.rb
licensee-8.3.1 test/test_licensee_package_info.rb
licensee-8.3.0 test/test_licensee_package_info.rb
licensee-8.2.0 test/test_licensee_package_info.rb
licensee-8.1.0 test/test_licensee_package_info.rb
licensee-8.0.0 test/test_licensee_package_info.rb
licensee-7.0.1 test/test_licensee_package_info.rb
licensee-7.0.0 test/test_licensee_package_info.rb