spec/licensee/license_spec.rb in licensee-8.9.2 vs spec/licensee/license_spec.rb in licensee-9.0.0.beta.1

- old
+ new

@@ -10,10 +10,11 @@ let(:mit) { described_class.find('mit') } let(:cc_by) { described_class.find('cc-by-4.0') } let(:unlicense) { described_class.find('unlicense') } let(:other) { described_class.find('other') } let(:gpl) { described_class.find('gpl-3.0') } + let(:lgpl) { described_class.find('lgpl-3.0') } let(:license_dir) do File.expand_path 'vendor/choosealicense.com/_licenses', project_root end @@ -167,10 +168,15 @@ it 'knows if a license is GPL' do expect(mit).to_not be_gpl expect(gpl).to be_gpl end + it 'knows a license is lgpl' do + expect(mit).to_not be_gpl + expect(lgpl).to be_lgpl + end + it 'knows if a license is CC' do expect(gpl).to_not be_creative_commons expect(cc_by).to be_creative_commons end end @@ -183,10 +189,11 @@ it 'strips leading whitespace' do expect(mit.content).to start_with('M') end it 'computes the hash' do - expect(mit.hash).to eql('d64f3bb4282a97b37454b5bb96a8a264a3363dc3') + content_hash = 'd64f3bb4282a97b37454b5bb96a8a264a3363dc3' + expect(mit.content_hash).to eql(content_hash) end context 'with content stubbed' do let(:license) do license = described_class.new 'MIT'