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:
commit
594b53232d
@ -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
15
spec/license_wrap_spec.rb
Normal 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
|
Loading…
x
Reference in New Issue
Block a user