Sha256: b52c4d8524d12743e9a281ad5c276754f755d7a38f179c70d2d65708da54b2e1

Contents?: true

Size: 398 Bytes

Versions: 8

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 offence for a line indented with tab' do
    inspect_source(cop, ["\tx = 0"])
    expect(cop.offences.size).to eq(1)
  end

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

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ridecharge-rubocop-0.0.1 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.18.1 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.18.0 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.17.0 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.16.0 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.15.0 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.14.1 spec/rubocop/cop/style/tab_spec.rb
rubocop-0.14.0 spec/rubocop/cop/style/tab_spec.rb