From f63afc0280a165002c5551acb625aa73472a9d77 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Mon, 21 Oct 2019 13:56:58 +0900 Subject: [PATCH] Suppress an offense for rails/presence_spec.rb This PR suppresses the following offense for rails/presence_spec.rb. ```console % bundle exec rake (snip) Offenses: spec/rubocop/cop/rails/presence_spec.rb:70:66: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/LineLength. it_behaves_like 'offense', <<~RUBY.chomp, <<~FIXED.chomp, 1, 7 # rubocop:disable Metrics/LineLength ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 126 files inspected, 1 offense detected RuboCop failed! ``` https://circleci.com/gh/rubocop-hq/rubocop-rails/1721 --- spec/rubocop/cop/rails/presence_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rubocop/cop/rails/presence_spec.rb b/spec/rubocop/cop/rails/presence_spec.rb index d5ff65ace8..471fc053a8 100644 --- a/spec/rubocop/cop/rails/presence_spec.rb +++ b/spec/rubocop/cop/rails/presence_spec.rb @@ -67,7 +67,7 @@ it_behaves_like 'offense', 'a if a.present?', 'a.presence', 1, 1 it_behaves_like 'offense', 'a unless a.blank?', 'a.presence', 1, 1 - it_behaves_like 'offense', <<~RUBY.chomp, <<~FIXED.chomp, 1, 7 # rubocop:disable Metrics/LineLength + it_behaves_like 'offense', <<~RUBY.chomp, <<~FIXED.chomp, 1, 7 if [1, 2, 3].map { |num| num + 1 } .map { |num| num + 2 } .present?