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