Sha256: 716f4164c98e7e10b2bf24d4821dcafa6689fef535c37778b059d1938df195e4

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-0.13.1 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.13.0 spec/rubocop/cop/style/tab_spec.rb