Sha256: 9fdec87913387e3b907d7da3289db21c010b71249644da2219e7fe1b0e5d09fd

Contents?: true

Size: 324 Bytes

Versions: 8

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 offence for has_and_belongs_to_many' do
    inspect_source(cop,
                   ['has_and_belongs_to_many :groups'])
    expect(cop.offences.size).to eq(1)
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

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