Sha256: 0eb8036abcfbf511b6b55758418472f6dc20c0eefc7876d8d430580fcbfb6ed1
Contents?: true
Size: 672 Bytes
Versions: 1
Compression:
Stored size: 672 Bytes
Contents
# frozen_string_literal: true RSpec.describe Licensee::Matchers::Exact do let(:mit) { Licensee::License.find('mit') } let(:content) { sub_copyright_info(mit) } let(:file) { Licensee::ProjectFiles::LicenseFile.new(content, 'LICENSE.txt') } subject { described_class.new(file) } 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 eql(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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
licensee-9.12.0 | spec/licensee/matchers/exact_matcher_spec.rb |