Sha256: db6dec023369cddf69585dda6977485db96bcfed0c5dfb1a60b91ec12cfc4ccc

Contents?: true

Size: 468 Bytes

Versions: 8

Compression:

Stored size: 468 Bytes

Contents

require 'helper'

class TestLicenseeExactMatcher < Minitest::Test

  def setup
    text = File.open(Licensee::License.find("mit").path).read.split("---").last
    blob = FakeBlob.new(text)
    @mit = Licensee::ProjectFile.new(blob, "LICENSE")
  end

  should "match the license" do
    assert_equal "mit", Licensee::ExactMatcher.match(@mit).key
  end

  should "know the match confidence" do
    assert_equal 100, Licensee::ExactMatcher.new(@mit).confidence
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
licensee-5.0.0 test/test_licensee_exact_matcher.rb
licensee-5.0.0b7 test/test_licensee_exact_matcher.rb
licensee-5.0.0b6 test/test_licensee_exact_matcher.rb
licensee-5.0.0b5 test/test_licensee_exact_matcher.rb
licensee-5.0.0b4 test/test_licensee_exact_matcher.rb
licensee-5.0.0b3 test/test_licensee_exact_matcher.rb
licensee-5.0.0b2 test/test_licensee_exact_matcher.rb
licensee-5.0.0b1 test/test_licensee_exact_matcher.rb