Sha256: 43f49f896e09e21b5a131803ce21e7aadcb024b30ea3fb20a61fffc6ec4e7b26

Contents?: true

Size: 620 Bytes

Versions: 2

Compression:

Stored size: 620 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Rubocop
  module Cop
    module Style
      describe BlockComments do
        subject(:block) { BlockComments.new }

        it 'registers an offence for block comments' do
          inspect_source(block,
                         ['=begin',
                          'comment',
                          '=end'])
          expect(block.offences.size).to eq(1)
        end

        it 'accepts regular comments' do
          inspect_source(block,
                         ['# comment'])
          expect(block.offences).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/block_comments_spec.rb
rubocop-0.13.0 spec/rubocop/cop/style/block_comments_spec.rb