1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01:00

only chomp longest line; rubocop

This commit is contained in:
Mike Linksvayer 2017-11-20 15:22:10 -08:00
parent 594b53232d
commit fea5b77e05

View File

@ -6,7 +6,8 @@ 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 }
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