Sha256: 9f5a5246e226af4830caa462607937f98bfe6e3fec5e43d717777961ac5c15e2

Contents?: true

Size: 583 Bytes

Versions: 7

Compression:

Stored size: 583 Bytes

Contents

require 'helper'

class TestLicenseeDiceMatchers < Minitest::Test
  def setup
    text = license_from_path(Licensee::License.find('mit').path)
    @mit = Licensee::Project::LicenseFile.new(text)
  end

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

  should 'know the match confidence' do
    matcher = Licensee::Matchers::Dice.new(@mit)
    assert matcher.confidence > 95, "#{matcher.confidence} < 95"
  end

  should 'calculate max delta' do
    assert_equal 83.7, Licensee::Matchers::Dice.new(@mit).max_delta
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
licensee-8.3.1 test/test_licensee_dice_matcher.rb
licensee-8.3.0 test/test_licensee_dice_matcher.rb
licensee-8.2.0 test/test_licensee_dice_matcher.rb
licensee-8.1.0 test/test_licensee_dice_matcher.rb
licensee-8.0.0 test/test_licensee_dice_matcher.rb
licensee-7.0.1 test/test_licensee_dice_matcher.rb
licensee-7.0.0 test/test_licensee_dice_matcher.rb