Sha256: 6f48cf8df4fe70b8c7cd1124403dd095364137f95ec3b9ba10ce6f9fa2b36f90
Contents?: true
Size: 682 Bytes
Versions: 5
Compression:
Stored size: 682 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) tws.offences.size.should == 1 end it 'registers an offence for a line ending with tab' do tws.inspect('file.rb', ["x = 0\t"], nil, nil) tws.offences.size.should == 1 end it 'accepts a line without trailing whitespace' do tws.inspect('file.rb', ["x = 0\n"], nil, nil) tws.offences.size.should == 0 end end end end
Version data entries
5 entries across 5 versions & 1 rubygems