Sha256: 2467b720a3dbe5700e34c520a821bba29bcade6a62e124ed22d8f1760fd2b8ef
Contents?: true
Size: 645 Bytes
Versions: 2
Compression:
Stored size: 645 Bytes
Contents
require 'helper' class PackageMatcherTestHelper < Licensee::Matchers::Package attr_accessor :license_property, :file end class TestLicenseePackageMatcher < Minitest::Test def setup pkg = File.read fixture_path('npm/package.json') @file = Licensee::Project::PackageInfo.new(pkg) @matcher = PackageMatcherTestHelper.new(@file) @matcher.license_property = 'mit' end should 'store the file' do assert_equal @matcher.file, @file end should 'match' do assert @matcher.match assert_equal 'mit', @matcher.match.key end should 'return the confidence' do assert_equal 90, @matcher.confidence end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
licensee-8.5.0 | test/licensee/matchers/test_package_matcher.rb |
licensee-8.4.0 | test/licensee/matchers/test_package_matcher.rb |