spec/licensee/matchers/cran_matcher_spec.rb in licensee-9.12.0 vs spec/licensee/matchers/cran_matcher_spec.rb in licensee-9.13.0
- old
+ new
@@ -1,24 +1,25 @@
# frozen_string_literal: true
RSpec.describe Licensee::Matchers::Cran do
+ subject { described_class.new(file) }
+
let(:mit) { Licensee::License.find('mit') }
let(:gpl2) { Licensee::License.find('gpl-2.0') }
let(:gpl3) { Licensee::License.find('gpl-3.0') }
let(:content) { "License: MIT + file LICENSE\nPackage: test" }
let(:file) { Licensee::ProjectFiles::LicenseFile.new(content, 'DESCRIPTION') }
- subject { described_class.new(file) }
it 'stores the file' do
expect(subject.file).to eql(file)
end
it 'matches MIT' do
expect(subject.match).to eql(mit)
end
it 'is confident' do
- expect(subject.confidence).to eql(90)
+ expect(subject.confidence).to be(90)
end
{
'MIT' => Licensee::License.find('mit'),
'MIT + file LICENSE' => Licensee::License.find('mit'),