Sha256: 0c37ec1c299cebe9d02b192494109645c0d2e75445cbb650c0180e8e4a00a5de
Contents?: true
Size: 602 Bytes
Versions: 4
Compression:
Stored size: 602 Bytes
Contents
# encoding: utf-8 require 'spec_helper' module Rubocop module Cop describe LineLength do let(:ll) { LineLength.new } before { LineLength.config = { 'Max' => 79 } } it "registers an offence for a line that's 80 characters wide" do ll.inspect(['#' * 80], nil, nil, nil) expect(ll.offences.size).to eq(1) expect(ll.offences.first.message).to eq('Line is too long. [80/79]') end it "accepts a line that's 79 characters wide" do ll.inspect(['#' * 79], nil, nil, nil) expect(ll.offences).to be_empty end end end end
Version data entries
4 entries across 4 versions & 1 rubygems