Sha256: b5467ce802c50a68cb5da3569a553192a4892a91d15e577c891ca1aadf2a3b7d

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Rubocop
  module Cop
    module Style
      describe SpaceAfterSemicolon do
        subject(:space) { SpaceAfterSemicolon.new }

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-0.13.1 spec/rubocop/cop/style/space_after_semicolon_spec.rb
rubocop-0.13.0 spec/rubocop/cop/style/space_after_semicolon_spec.rb