Sha256: 06d3d36e8f569b50a9d5aa5ed5585547cb5b1b5bbd650c291cfeb8568ef46357

Contents?: true

Size: 324 Bytes

Versions: 6

Compression:

Stored size: 324 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Rubocop::Cop::Rails::HasAndBelongsToMany do
  subject(:cop) { described_class.new }

  it 'registers an offense for has_and_belongs_to_many' do
    inspect_source(cop,
                   ['has_and_belongs_to_many :groups'])
    expect(cop.offenses.size).to eq(1)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubocop-0.22.0 spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb
rubocop-0.21.0 spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb
rubocop-0.20.1 spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb
rubocop-0.20.0 spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb
rubocop-0.19.1 spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb
rubocop-0.19.0 spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb