Sha256: eacd51fa749ac3da0c97da04e41789d11d7309180059339c3bea8376c3ba232e

Contents?: true

Size: 313 Bytes

Versions: 4

Compression:

Stored size: 313 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Rubocop::Cop::Style::OneLineConditional do
  subject(:cop) { described_class.new }

  it 'registers an offence for one line if/then/end' do
    inspect_source(cop, ['if cond then run else dont end'])
    expect(cop.messages).to eq([cop.error_message])
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.16.0 spec/rubocop/cop/style/one_line_conditional_spec.rb
rubocop-0.15.0 spec/rubocop/cop/style/one_line_conditional_spec.rb
rubocop-0.14.1 spec/rubocop/cop/style/one_line_conditional_spec.rb
rubocop-0.14.0 spec/rubocop/cop/style/one_line_conditional_spec.rb