Sha256: fce12269037ca0bb07f798526eec5234f6674a36ceed47956d8a2093cb8e91f6
Contents?: true
Size: 672 Bytes
Versions: 14
Compression:
Stored size: 672 Bytes
Contents
# frozen_string_literal: true RSpec.describe Licensee::Matchers::Exact do subject { described_class.new(file) } let(:mit) { Licensee::License.find('mit') } let(:content) { sub_copyright_info(mit) } let(:file) { Licensee::ProjectFiles::LicenseFile.new(content, 'LICENSE.txt') } it 'stores the file' do expect(subject.file).to eql(file) end it 'matches' do expect(content).to be_detected_as(mit) end it 'is confident' do expect(subject.confidence).to be(100) end context 'with extra words added' do let(:content) { add_random_words(mit.content) } it "doesn't match" do expect(subject.match).to be_nil end end end
Version data entries
14 entries across 14 versions & 1 rubygems