Sha256: ace8560ad094ea41d76c9be18940c273a4944e3ebef842b0408fb9533f87ea16

Contents?: true

Size: 481 Bytes

Versions: 2

Compression:

Stored size: 481 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  it 'registers an offence for semicolon without space after it' do
    inspect_source(cop, ['x = 1;y = 2'])
    expect(cop.messages).to eq(
      ['Space missing after semicolon.'])
  end

  it 'does not crash if semicolon is the last character of the file' do
    inspect_source(cop, ['x = 1;'])
    expect(cop.messages).to be_empty
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-0.14.1 spec/rubocop/cop/style/space_after_semicolon_spec.rb
rubocop-0.14.0 spec/rubocop/cop/style/space_after_semicolon_spec.rb