Sha256: b5e82a7e252978b5c21694de3383b590b66a24b6354383586de8735476359e47
Contents?: true
Size: 639 Bytes
Versions: 7
Compression:
Stored size: 639 Bytes
Contents
# encoding: utf-8 require 'spec_helper' module Rubocop module Cop module Style 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 inspect_source(ll, ['#' * 80]) 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 inspect_source(ll, ['#' * 79]) expect(ll.offences).to be_empty end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems