1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-23 05:10:11 +01:00
choosealicense.com/spec/license_wrap_spec.rb

16 lines
430 B
Ruby
Raw Normal View History

2017-11-19 12:11:14 -08:00
# frozen_string_literal: true
require 'spec_helper'
describe 'word wrapping' do
2017-11-20 12:56:03 -08:00
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
2017-11-19 12:11:14 -08:00
end
end
end
end