1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

Merge branch 'gh-pages' into spdx-license-templates

This commit is contained in:
Mike Linksvayer 2017-11-20 13:09:50 -08:00 committed by GitHub
commit 594b53232d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -3,7 +3,7 @@
require 'spec_helper'
describe 'byte order marks' do
Dir["#{licenses_path}/*.html"].each do |file|
Dir["#{licenses_path}/*.txt"].each do |file|
context "the #{File.basename(file, '.txt')} license" do
it 'does not begin with a byte order mark' do
bom = File.open(file).read.start_with?("\u0000EF\u0000BB\u0000BF")

15
spec/license_wrap_spec.rb Normal file
View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'word wrapping' do
licenses.each do |license|
context "the #{license['slug']} license" do
it 'wraps at line length 78' do
max_line = license['content'].lines.max_by { |line| line.chomp!.length }
msg = "Longest line is #{max_line.length} characters: #{max_line}"
expect(max_line.length).to be <= 78, msg
end
end
end
end