diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-16 15:46:40 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-16 18:29:37 +0300 |
commit | 9606dbbb033567de9831a8cdea0e56236e7d2eb2 (patch) | |
tree | a83e2103a7f3ab31836375f1adbef605f050f0f8 /spec/rubocop/cop/destroy_all_spec.rb | |
parent | 96ce2da74ee36e88f20cbd7ceaff2ab49f0bb223 (diff) |
Whitelist existing destroy_all offenses
This whitelists all existing places where we use "destroy_all".
Diffstat (limited to 'spec/rubocop/cop/destroy_all_spec.rb')
-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) |