1
0
mirror of https://github.com/github/choosealicense.com synced 2024-07-02 16:39:13 +02:00
choosealicense.com/spec/license_category_spec.rb
2016-02-12 16:00:12 -08:00

21 lines
607 B
Ruby

require 'spec_helper'
describe 'license categories' do
families.each do |family|
context "the #{family} family" do
family_licenses = licenses.select { |l| l['family'] == family }
primary = family_licenses.select { |l| l['variant'] == false }
variants = family_licenses.select { |l| l['variant'] == true }
it 'should only have one primary license' do
expect(primary.count).to eql(1)
end
it 'all other licenses should be variants' do
expected = family_licenses.count - 1
expect(variants.count).to eql(expected)
end
end
end
end