Sha256: 6afad94f74be7bde33c1c1b6ed33b437dce636346965b9d17a7b57011d39945d
Contents?: true
Size: 510 Bytes
Versions: 1
Compression:
Stored size: 510 Bytes
Contents
require 'spec_helper' module Rubocop module Cop describe LineLength do let (:ll) { LineLength.new } it "registers an offence for a line that's 80 characters wide" do ll.inspect('file.rb', ['#' * 80]) ll.offences.size.should == 1 ll.offences.first.message.should == 'Line is too long. [80/79]' end it "accepts a line that's 79 characters wide" do ll.inspect('file.rb', ['#' * 79]) ll.offences.size.should == 0 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.1.0 | spec/rubocop/cops/line_length_spec.rb |