spec/licensee/matchers/package_matcher_spec.rb in licensee-9.12.0 vs spec/licensee/matchers/package_matcher_spec.rb in licensee-9.13.0
- old
+ new
@@ -1,24 +1,26 @@
# frozen_string_literal: true
RSpec.describe Licensee::Matchers::Package do
+ subject { described_class.new(file) }
+
let(:mit) { Licensee::License.find('mit') }
let(:content) { '' }
let(:file) do
Licensee::ProjectFiles::LicenseFile.new(content, 'project.gemspec')
end
let(:license_property) { 'mit' }
- subject { described_class.new(file) }
+
before do
allow(subject).to receive(:license_property).and_return(license_property)
end
it 'matches' do
expect(subject.match).to eql(mit)
end
it 'has confidence' do
- expect(subject.confidence).to eql(90)
+ expect(subject.confidence).to be(90)
end
context 'with a nil license property' do
let(:license_property) { nil }