match _ fields, require preceding space (ex CECILL-2.1)

This commit is contained in:
Mike Linksvayer 2018-01-02 14:35:04 -08:00
parent d7bf3ac98a
commit 316bd0b828
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ describe 'license fillable fields' do
licenses.each do |license|
context "The #{license['title']} license" do
it 'should only contain supported fillable fields' do
matches = license['content'][0, 1000].scan(/\[([a-z]+)\]/)
matches = license['content'][1, 1000].scan(/\s+\[([a-z_]+)\]/)
extra_fields = matches.flatten - (fields.map { |f| f['name'] })
expect(extra_fields).to be_empty
end