spec/licensee/license_rules_spec.rb in licensee-9.12.0 vs spec/licensee/license_rules_spec.rb in licensee-9.13.0
- old
+ new
@@ -1,11 +1,12 @@
# frozen_string_literal: true
RSpec.describe Licensee::LicenseRules do
- let(:mit) { Licensee::License.find('mit') }
subject { mit.rules }
+ let(:mit) { Licensee::License.find('mit') }
+
Licensee::Rule.groups.each do |group|
context "the #{group} rule group" do
it 'responds as a hash key string' do
expect(subject[group]).to be_a(Array)
end
@@ -35,11 +36,12 @@
expect(subject.permissions.first.label).to eql('Commercial use')
end
end
context 'created from a hash' do
- let(:hash) { { 'permissions' => Licensee::Rule.all } }
subject { described_class.from_hash(hash) }
+
+ let(:hash) { { 'permissions' => Licensee::Rule.all } }
it 'exposes the rules' do
expect(subject.permissions.first.label).to eql('Commercial use')
end
end