Sha256: e6b99e8158aa3cfb8de0616c5961f2eea5b264c1dde0b634fea5f5f14387391f

Contents?: true

Size: 476 Bytes

Versions: 4

Compression:

Stored size: 476 Bytes

Contents

require 'helper'

class TestLicenseeExactMatchers < Minitest::Test
  def setup
    path = Licensee::License.find('mit').path
    text = File.read(path, encoding: 'utf-8').split('---').last
    @mit = Licensee::Project::LicenseFile.new(text)
  end

  should 'match the license' do
    assert_equal 'mit', Licensee::Matchers::Exact.new(@mit).match.key
  end

  should 'know the match confidence' do
    assert_equal 100, Licensee::Matchers::Exact.new(@mit).confidence
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
licensee-8.3.1 test/test_licensee_exact_matcher.rb
licensee-8.3.0 test/test_licensee_exact_matcher.rb
licensee-8.2.0 test/test_licensee_exact_matcher.rb
licensee-8.1.0 test/test_licensee_exact_matcher.rb