spec/licensee/license_field_spec.rb in licensee-9.12.0 vs spec/licensee/license_field_spec.rb in licensee-9.13.0

- old
+ new

@@ -4,11 +4,11 @@ let(:expected_count) { 7 } context 'class' do it 'returns all license fields' do expect(described_class.all.count).to eql(expected_count) - expect(described_class.all.first).to be_a(Licensee::LicenseField) + expect(described_class.all.first).to be_a(described_class) end it 'returns all license field keys' do expect(described_class.keys.count).to eql(expected_count) expect(described_class.keys.first).to be_a(String) @@ -33,11 +33,11 @@ context 'from an array' do let(:array) { %w[year fullname] } let(:fields) { described_class.from_array(array) } it 'returns an array of LicenseFields' do - expect(fields.count).to eql(2) + expect(fields.count).to be(2) expect(fields.first).to be_a(described_class) expect(fields.first.name).to eql('year') expect(fields.last.name).to eql('fullname') end end @@ -45,10 +45,10 @@ context 'from content' do let(:content) { 'Foo [year] bar [baz] [fullname]' } let(:fields) { described_class.from_content(content) } it 'pulls fields from content' do - expect(fields.count).to eql(2) + expect(fields.count).to be(2) expect(fields.first.key).to eql('year') expect(fields[1].key).to eql('fullname') end end end