spec/licensee/license_spec.rb in licensee-9.0.0 vs spec/licensee/license_spec.rb in licensee-9.1.0
- old
+ new
@@ -125,14 +125,29 @@
it 'exposes the key' do
expect(mit.key).to eql('mit')
end
+ it 'exposes the SPDX ID' do
+ expect(gpl.spdx_id).to eql('GPL-3.0')
+ end
+
+ context '#other?' do
+ it 'knows MIT is not other' do
+ expect(gpl).to_not be_other
+ end
+
+ it 'knows the other license is other?' do
+ expect(other).to be_other
+ end
+ end
+
context 'meta' do
it 'exposes license meta' do
expect(mit).to respond_to(:meta)
- expect(mit.meta).to have_key('title')
+ expect(mit.meta).to respond_to(:title)
expect(mit.meta['title']).to eql('MIT License')
+ expect(mit.meta.title).to eql('MIT License')
end
it 'includes defaults' do
expect(other.meta['hidden']).to eql(true)
end