Sha256: f1de97d2c732973579b05414c27ef4ba0028bf51973eced326be8038f4d92af9

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

require 'helper'

class TestLicenseeProjectFile < Minitest::Test

  def setup
    @repo = Rugged::Repository.new(fixture_path("licenses.git"))
    blob, _ = Rugged::Blob.to_buffer(@repo, 'bcb552d06d9cf1cd4c048a6d3bf716849c2216cc')
    @file = Licensee::Project::LicenseFile.new(blob)
    @gpl = Licensee::License.find "GPL-3.0"
    @mit = Licensee::License.find "MIT"
  end

  should "read the file" do
    assert @file.content =~ /MIT/
  end

  should "match the license" do
    assert_equal "mit", @file.license.key
  end

  should "calculate confidence" do
    assert_equal 100, @file.confidence
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
licensee-6.1.1 test/test_licensee_project_file.rb
licensee-6.1.0 test/test_licensee_project_file.rb