diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-16 14:46:40 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-16 17:29:37 +0200 |
commit | 9606dbbb033567de9831a8cdea0e56236e7d2eb2 (patch) | |
tree | a83e2103a7f3ab31836375f1adbef605f050f0f8 /spec/rubocop | |
parent | 96ce2da74ee36e88f20cbd7ceaff2ab49f0bb223 (diff) | |
download | gitlab-ce-9606dbbb033567de9831a8cdea0e56236e7d2eb2.tar.gz |
Whitelist existing destroy_all offensesblacklist-destroy-all
This whitelists all existing places where we use "destroy_all".
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/destroy_all_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/rubocop/cop/destroy_all_spec.rb b/spec/rubocop/cop/destroy_all_spec.rb index 153a5a863cf..b0bc40552b3 100644 --- a/spec/rubocop/cop/destroy_all_spec.rb +++ b/spec/rubocop/cop/destroy_all_spec.rb @@ -9,13 +9,13 @@ describe RuboCop::Cop::DestroyAll do subject(:cop) { described_class.new } it 'flags the use of destroy_all with a send receiver' do - inspect_source('foo.destroy_all') + inspect_source('foo.destroy_all # rubocop: disable DestroyAll') expect(cop.offenses.size).to eq(1) end it 'flags the use of destroy_all with a constant receiver' do - inspect_source('User.destroy_all') + inspect_source('User.destroy_all # rubocop: disable DestroyAll') expect(cop.offenses.size).to eq(1) end @@ -29,7 +29,7 @@ describe RuboCop::Cop::DestroyAll do it 'flags the use of destroy_all with a local variable receiver' do inspect_source(<<~RUBY) users = User.all - users.destroy_all + users.destroy_all # rubocop: disable DestroyAll RUBY expect(cop.offenses.size).to eq(1) |