Sha256: 6f6f73bff23245dc93c0c0112d2dc3720d42401013c242dcc658c74e6b94e800

Contents?: true

Size: 612 Bytes

Versions: 7

Compression:

Stored size: 612 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

7 entries across 7 versions & 2 rubygems

Version Path
rubocop-0.12.0 spec/rubocop/cop/style/not_spec.rb
rubocop-0.11.1 spec/rubocop/cop/style/not_spec.rb
rubocop-0.11.0 spec/rubocop/cops/style/not_spec.rb
rubocop-0.10.0 spec/rubocop/cops/style/not_spec.rb
rubocop-0.9.1 spec/rubocop/cops/style/not_spec.rb
sabat-rubocop-0.9.0 spec/rubocop/cops/style/not_spec.rb
rubocop-0.9.0 spec/rubocop/cops/style/not_spec.rb