summaryrefslogtreecommitdiff
path: root/spec/rubocop/cop/destroy_all_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubocop/cop/destroy_all_spec.rb')
-rw-r--r--spec/rubocop/cop/destroy_all_spec.rb6
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)