From 9606dbbb033567de9831a8cdea0e56236e7d2eb2 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 16 Aug 2018 14:46:40 +0200 Subject: Whitelist existing destroy_all offenses This whitelists all existing places where we use "destroy_all". --- spec/rubocop/cop/destroy_all_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/rubocop/cop/destroy_all_spec.rb') 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) -- cgit v1.2.3