Sha256: dea3e59429ce08388577fae2970c8cef595f52c4a33896c981dec798878f8fd9

Contents?: true

Size: 458 Bytes

Versions: 26

Compression:

Stored size: 458 Bytes

Contents

require 'helper'

class TestLicenseeExactMatcher < Minitest::Test

  def setup
    text = File.open(Licensee::Licenses.find("mit").path).read.split("---").last
    blob = FakeBlob.new(text)
    @mit = Licensee::LicenseFile.new(blob)
  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

26 entries across 26 versions & 1 rubygems

Version Path
licensee-4.9.0 test/test_licensee_exact_matcher.rb
licensee-4.8.0 test/test_licensee_exact_matcher.rb
licensee-4.7.4 test/test_licensee_exact_matcher.rb
licensee-4.7.3 test/test_licensee_exact_matcher.rb
licensee-4.7.2 test/test_licensee_exact_matcher.rb
licensee-4.7.1 test/test_licensee_exact_matcher.rb
licensee-4.7.0 test/test_licensee_exact_matcher.rb
licensee-4.6.0 test/test_licensee_exact_matcher.rb
licensee-4.5.0 test/test_licensee_exact_matcher.rb
licensee-4.4.2 test/test_licensee_exact_matcher.rb
licensee-4.4.1 test/test_licensee_exact_matcher.rb
licensee-4.4.0 test/test_licensee_exact_matcher.rb
licensee-4.3.3 test/test_licensee_exact_matcher.rb
licensee-4.3.2 test/test_licensee_exact_matcher.rb
licensee-4.3.1 test/test_licensee_exact_matcher.rb
licensee-4.3.0 test/test_licensee_exact_matcher.rb
licensee-4.2.4 test/test_licensee_exact_matcher.rb
licensee-4.2.3 test/test_licensee_exact_matcher.rb
licensee-4.2.2 test/test_licensee_exact_matcher.rb
licensee-4.2.1 test/test_licensee_exact_matcher.rb