Sha256: f96589ae2fe2f1912bf4b1e4073f78b412b6ce1977e9be4401dd6a2410e4087f
Contents?: true
Size: 400 Bytes
Versions: 6
Compression:
Stored size: 400 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Rubocop::Cop::Style::OneLineConditional do subject(:cop) { described_class.new } it 'registers an offense for one line if/then/end' do inspect_source(cop, ['if cond then run else dont end']) expect(cop.messages).to eq(['Favor the ternary operator (?:)' \ ' over if/then/else/end constructs.']) end end
Version data entries
6 entries across 6 versions & 1 rubygems