Sha256: cbb75e7ccabd63418565e7727e6ccfff7b659d5dfaf779a0b65c3d20259cc848

Contents?: true

Size: 561 Bytes

Versions: 4

Compression:

Stored size: 561 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Rubocop
  module Cop
    describe BlockComments do
      let(: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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.8.3 spec/rubocop/cops/block_comments_spec.rb
rubocop-0.8.2 spec/rubocop/cops/block_comments_spec.rb
rubocop-0.8.1 spec/rubocop/cops/block_comments_spec.rb
rubocop-0.8.0 spec/rubocop/cops/block_comments_spec.rb