Sha256: a0a9e70080734b7d8979218661be7576b77afd445192000a432722a83e59735f
Contents?: true
Size: 694 Bytes
Versions: 13
Compression:
Stored size: 694 Bytes
Contents
# encoding: utf-8 require 'spec_helper' module Rubocop module Cop describe TrailingWhitespace do let(:tws) { TrailingWhitespace.new } it 'registers an offence for a line ending with space' do source = ['x = 0 '] tws.inspect('file.rb', source, nil, nil) expect(tws.offences.size).to eq(1) end it 'registers an offence for a line ending with tab' do tws.inspect('file.rb', ["x = 0\t"], nil, nil) expect(tws.offences.size).to eq(1) end it 'accepts a line without trailing whitespace' do tws.inspect('file.rb', ["x = 0\n"], nil, nil) expect(tws.offences).to be_empty end end end end
Version data entries
13 entries across 13 versions & 1 rubygems