Sha256: 5dec97ec4ed74549db80a83d58a482ca4608b4b8139377cc26fbf15c642c5b87

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Rubocop
  module Cop
    module Style
      describe Not do
        subject(:a) { Not.new }

        it 'registers an offence for not' do
          inspect_source(a, ['not test'])
          expect(a.offences.size).to eq(1)
        end

        it 'does not register an offence for !' do
          inspect_source(a, ['!test'])
          expect(a.offences).to be_empty
        end

        it 'does not register an offence for :not' do
          inspect_source(a, ['[:not, :if, :else]'])
          expect(a.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/not_spec.rb
rubocop-0.13.0 spec/rubocop/cop/style/not_spec.rb