diff --git a/spec/license_wrap_spec.rb b/spec/license_wrap_spec.rb index 9ab174d..c8bc4f8 100644 --- a/spec/license_wrap_spec.rb +++ b/spec/license_wrap_spec.rb @@ -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