1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00
choosealicense.com/spec/license_wrap_spec.rb
2017-11-20 15:22:10 -08:00

17 lines
444 B
Ruby

# 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(&:length)
max_line = max_line.chomp
msg = "Longest line is #{max_line.length} characters: #{max_line}"
expect(max_line.length).to be <= 78, msg
end
end
end
end