Sha256: 83518bf250f0544185431dee774b7340d177b305693fc26c9f7b92baf65d642b
Contents?: true
Size: 408 Bytes
Versions: 13
Compression:
Stored size: 408 Bytes
Contents
# encoding: utf-8 require 'spec_helper' module Rubocop module Cop describe IfWithSemicolon do let(:iws) { IfWithSemicolon.new } it 'registers an offence for one line if/;/end' do inspect_source(iws, '', ['if cond; run else dont end']) expect(iws.offences.map(&:message)).to eq( ['Never use if x; Use the ternary operator instead.']) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems