Sha256: 087bcda10220003f6ad0602f096832a78941bd137646f24aed0c5f8caf9e239f

Contents?: true

Size: 490 Bytes

Versions: 7

Compression:

Stored size: 490 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Rubocop
  module Cop
    module Style
      describe Tab do
        let(:tab) { Tab.new }

        it 'registers an offence for a line indented with tab' do
          inspect_source(tab, ["\tx = 0"])
          expect(tab.offences.size).to eq(1)
        end

        it 'accepts a line with tab in a string' do
          inspect_source(tab, ["(x = \"\t\")"])
          expect(tab.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/tab_spec.rb
rubocop-0.11.1 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.11.0 spec/rubocop/cops/style/tab_spec.rb
rubocop-0.10.0 spec/rubocop/cops/style/tab_spec.rb
rubocop-0.9.1 spec/rubocop/cops/style/tab_spec.rb
sabat-rubocop-0.9.0 spec/rubocop/cops/style/tab_spec.rb
rubocop-0.9.0 spec/rubocop/cops/style/tab_spec.rb