Sha256: dbe49619b36db556d670597488014e31a75de998c07068d6ece82e09edc928d0

Contents?: true

Size: 398 Bytes

Versions: 4

Compression:

Stored size: 398 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe RuboCop::Cop::Style::Tab do
  subject(:cop) { described_class.new }

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

  it 'accepts a line with tab in a string' do
    inspect_source(cop, ["(x = \"\t\")"])
    expect(cop.offenses).to be_empty
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.25.0 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.24.1 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.24.0 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.23.0 spec/rubocop/cop/style/tab_spec.rb