mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 21:00:10 +01:00
only chomp longest line; rubocop
This commit is contained in:
parent
594b53232d
commit
fea5b77e05
@ -6,7 +6,8 @@ describe 'word wrapping' do
|
|||||||
licenses.each do |license|
|
licenses.each do |license|
|
||||||
context "the #{license['slug']} license" do
|
context "the #{license['slug']} license" do
|
||||||
it 'wraps at line length 78' 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}"
|
msg = "Longest line is #{max_line.length} characters: #{max_line}"
|
||||||
expect(max_line.length).to be <= 78, msg
|
expect(max_line.length).to be <= 78, msg
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user